- Removed some duplicated code from custom reactions

- CREmbed completely removed and replaced by SmartText
This commit is contained in:
Kwoth
2021-07-12 03:02:38 +02:00
parent 9f6cbe0929
commit 0b71e9c28f
5 changed files with 20 additions and 273 deletions

View File

@@ -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;
}
}
}