mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Added .emojiremove
This commit is contained in:
@@ -367,6 +367,36 @@ public partial class Utility : NadekoModule
|
||||
await ConfirmLocalizedAsync(strs.emoji_added(em.ToString()));
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[BotPerm(GuildPerm.ManageEmojisAndStickers)]
|
||||
[UserPerm(GuildPerm.ManageEmojisAndStickers)]
|
||||
[Priority(0)]
|
||||
public async Task EmojiRemove(params Emote[] emotes)
|
||||
{
|
||||
var fails = new List<Emote>();
|
||||
foreach (var emote in emotes)
|
||||
{
|
||||
var guildEmote = await ctx.Guild.GetEmoteAsync(emote.Id);
|
||||
if (guildEmote is null)
|
||||
{
|
||||
fails.Add(emote);
|
||||
}
|
||||
else
|
||||
{
|
||||
await ctx.Guild.DeleteEmoteAsync(guildEmote);
|
||||
}
|
||||
}
|
||||
|
||||
if (fails.Count > 0)
|
||||
{
|
||||
await ReplyPendingLocalizedAsync(strs.emoji_not_removed(fails.Select(x => x.ToString()).Join(" ")));
|
||||
return;
|
||||
}
|
||||
|
||||
await ctx.OkAsync();
|
||||
}
|
||||
|
||||
[Cmd]
|
||||
[OwnerOnly]
|
||||
public async Task ListServers(int page = 1)
|
||||
|
@@ -719,6 +719,13 @@ showemojis:
|
||||
emojiadd:
|
||||
- emojiadd
|
||||
- ea
|
||||
emojiremove:
|
||||
- emojiremove
|
||||
- emojirm
|
||||
- er
|
||||
- ed
|
||||
- emojidel
|
||||
- emojidelete
|
||||
deckshuffle:
|
||||
- deckshuffle
|
||||
- dsh
|
||||
|
@@ -12,6 +12,7 @@
|
||||
"invalid_emoji_link": "Specified link is either not an image or exceeds 256KB.",
|
||||
"emoji_add_error": "Error adding emoji. You either ran out of emoji slots, or image size is inadequate.",
|
||||
"emoji_added": "Added a new emoji: {0}",
|
||||
"emoji_not_removed": "The following emojis were not removed: {0}",
|
||||
"fw_cleared": "Removed all filtered words and filtered words channel settings.",
|
||||
"aliases_cleared": "All {0} aliases on this server have been removed.",
|
||||
"no_results": "No results found.",
|
||||
|
Reference in New Issue
Block a user