mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
Fixed a nullref message when the bot is loading medusae. Added support for multiple embeds in features which support custom embeds in the form of
{plainText:text-here, embeds: [embedObject, embedObject, embedObject]}
This commit is contained in:
@@ -36,9 +36,17 @@ public class Replacer
|
||||
{
|
||||
SmartEmbedText embedData => Replace(embedData),
|
||||
SmartPlainText plain => Replace(plain),
|
||||
SmartEmbedTextArray arr => Replace(arr),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(data), "Unsupported argument type")
|
||||
};
|
||||
|
||||
public SmartEmbedTextArray Replace(SmartEmbedTextArray embedArr)
|
||||
=> new()
|
||||
{
|
||||
Embeds = embedArr.Embeds.Map(Replace),
|
||||
PlainText = Replace(embedArr.PlainText)
|
||||
};
|
||||
|
||||
public SmartPlainText Replace(SmartPlainText plainText)
|
||||
=> Replace(plainText.Text);
|
||||
|
||||
|
Reference in New Issue
Block a user