Added .emojiremove command

This commit is contained in:
Kwoth
2022-08-11 16:03:04 +02:00
parent 0ff02cede9
commit b853495d65
2 changed files with 10 additions and 1 deletions

View File

@@ -374,10 +374,15 @@ public partial class Utility : NadekoModule
[Priority(0)]
public async Task EmojiRemove(params Emote[] emotes)
{
if (emotes.Length == 0)
return;
var g = (SocketGuild)ctx.Guild;
var fails = new List<Emote>();
foreach (var emote in emotes)
{
var guildEmote = await ctx.Guild.GetEmoteAsync(emote.Id);
var guildEmote = g.Emotes.FirstOrDefault(x => x.Id == emote.Id);
if (guildEmote is null)
{
fails.Add(emote);