mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-03 16:24:27 -05:00 
			
		
		
		
	Added .emojiremove command
This commit is contained in:
		@@ -374,10 +374,15 @@ public partial class Utility : NadekoModule
 | 
				
			|||||||
    [Priority(0)]
 | 
					    [Priority(0)]
 | 
				
			||||||
    public async Task EmojiRemove(params Emote[] emotes)
 | 
					    public async Task EmojiRemove(params Emote[] emotes)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					        if (emotes.Length == 0)
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        var g = (SocketGuild)ctx.Guild;
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        var fails = new List<Emote>();
 | 
					        var fails = new List<Emote>();
 | 
				
			||||||
        foreach (var emote in emotes)
 | 
					        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)
 | 
					            if (guildEmote is null)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                fails.Add(emote);
 | 
					                fails.Add(emote);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1217,6 +1217,10 @@ emojiadd:
 | 
				
			|||||||
    - ":someonesCustomEmoji:"
 | 
					    - ":someonesCustomEmoji:"
 | 
				
			||||||
    - "MyEmojiName :someonesCustomEmoji:"
 | 
					    - "MyEmojiName :someonesCustomEmoji:"
 | 
				
			||||||
    - "owoNice https://cdn.discordapp.com/emojis/587930873811173386.png?size=128"
 | 
					    - "owoNice https://cdn.discordapp.com/emojis/587930873811173386.png?size=128"
 | 
				
			||||||
 | 
					emojiremove:
 | 
				
			||||||
 | 
					  desc: "Removes the specified emoji or emojis from this server."
 | 
				
			||||||
 | 
					  args:
 | 
				
			||||||
 | 
					    - ":eagleWarrior: :plumedArcher:"
 | 
				
			||||||
deckshuffle:
 | 
					deckshuffle:
 | 
				
			||||||
  desc: "Reshuffles all cards back into the deck."
 | 
					  desc: "Reshuffles all cards back into the deck."
 | 
				
			||||||
  args:
 | 
					  args:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user