export: better document the required permissions

This commit is contained in:
Io Mintz 2020-01-18 00:20:20 +00:00
parent 9fd2f5c2c6
commit 1669ab6362
2 changed files with 5 additions and 1 deletions

View File

@ -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:

View File

@ -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))