From 1669ab6362084f0f8249bb395039113f4cad958c Mon Sep 17 00:00:00 2001 From: Io Mintz Date: Sat, 18 Jan 2020 00:20:20 +0000 Subject: [PATCH] export: better document the required permissions --- cogs/emote.py | 5 ++++- cogs/meta.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cogs/emote.py b/cogs/emote.py index 35e31e8..922bf56 100644 --- a/cogs/emote.py +++ b/cogs/emote.py @@ -198,13 +198,16 @@ class Emotes(commands.Cog): await context.send(message) - @commands.command(name='export') + @commands.command() + @commands.bot_has_permissions(attach_files=True) async def export(self, context, *, image_type: emote_type_filter = lambda _: True): """Export all emotes from this server to a zip file, suitable for use with the import command. If “animated” is provided, only include animated emotes. If “static” is provided, only include static emotes. Otherwise, or if “all” is provided, export all emotes. + + This command requires the “attach files” permission. """ emotes = list(filter(image_type, context.guild.emojis)) if not emotes: diff --git a/cogs/meta.py b/cogs/meta.py index 99e7d85..6ac055d 100644 --- a/cogs/meta.py +++ b/cogs/meta.py @@ -25,6 +25,7 @@ class Meta(commands.Cog): 'external_emojis', 'manage_emojis', 'embed_links', + 'attach_files', ), True)) await context.send('<%s>' % discord.utils.oauth_url(self.bot.user.id, permissions))