- 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

@@ -68,17 +68,6 @@ namespace NadekoBot.Extensions
_ => throw new ArgumentOutOfRangeException(nameof(text))
};
public static Task<IUserMessage> EmbedAsync(this IMessageChannel channel, CREmbed crEmbed, IEmbedBuilderService eb, bool sanitizeAll = false)
{
var plainText = sanitizeAll
? crEmbed.PlainText?.SanitizeAllMentions() ?? ""
: crEmbed.PlainText?.SanitizeMentions() ?? "";
return channel.SendMessageAsync(plainText, embed: crEmbed.IsEmbedValid
? crEmbed.ToEmbed(eb).Build()
: null);
}
public static List<ulong> GetGuildIds(this DiscordSocketClient client)
=> client.Guilds.Select(x => x.Id).ToList();