mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
- Removed some duplicated code from custom reactions
- CREmbed completely removed and replaced by SmartText
This commit is contained in:
@@ -85,34 +85,5 @@ namespace NadekoBot.Common.Replacements
|
||||
|
||||
return newEmbedData;
|
||||
}
|
||||
|
||||
public CREmbed Replace(CREmbed embedData)
|
||||
{
|
||||
embedData.PlainText = Replace(embedData.PlainText);
|
||||
embedData.Description = Replace(embedData.Description);
|
||||
embedData.Title = Replace(embedData.Title);
|
||||
embedData.Thumbnail = Replace(embedData.Thumbnail);
|
||||
embedData.Image = Replace(embedData.Image);
|
||||
if (embedData.Author != null)
|
||||
{
|
||||
embedData.Author.Name = Replace(embedData.Author.Name);
|
||||
embedData.Author.IconUrl = Replace(embedData.Author.IconUrl);
|
||||
}
|
||||
|
||||
if (embedData.Fields != null)
|
||||
foreach (var f in embedData.Fields)
|
||||
{
|
||||
f.Name = Replace(f.Name);
|
||||
f.Value = Replace(f.Value);
|
||||
}
|
||||
|
||||
if (embedData.Footer != null)
|
||||
{
|
||||
embedData.Footer.Text = Replace(embedData.Footer.Text);
|
||||
embedData.Footer.IconUrl = Replace(embedData.Footer.IconUrl);
|
||||
}
|
||||
|
||||
return embedData;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user