Catch cannot paginate errors
This commit is contained in:
parent
6d65710cfe
commit
7ce7d66c48
|
@ -53,7 +53,7 @@ class Miscellaneous(commands.Cog):
|
||||||
@utils.can_run(send_messages=True)
|
@utils.can_run(send_messages=True)
|
||||||
async def help(self, ctx, *, command: str = None):
|
async def help(self, ctx, *, command: str = None):
|
||||||
"""Shows help about a command or the bot"""
|
"""Shows help about a command or the bot"""
|
||||||
|
try:
|
||||||
if command is None:
|
if command is None:
|
||||||
p = await utils.HelpPaginator.from_bot(ctx)
|
p = await utils.HelpPaginator.from_bot(ctx)
|
||||||
else:
|
else:
|
||||||
|
@ -68,6 +68,10 @@ class Miscellaneous(commands.Cog):
|
||||||
p = await utils.HelpPaginator.from_cog(ctx, entity)
|
p = await utils.HelpPaginator.from_cog(ctx, entity)
|
||||||
|
|
||||||
await p.paginate()
|
await p.paginate()
|
||||||
|
except utils.CannotPaginate:
|
||||||
|
await ctx.send(
|
||||||
|
"I need embed links permissions in order to do this command :("
|
||||||
|
)
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
@utils.can_run(send_messages=True)
|
@utils.can_run(send_messages=True)
|
||||||
|
|
Loading…
Reference in a new issue