1
0
Fork 0
mirror of synced 2024-05-20 20:42:27 +12:00

Don't include commands that a user can't run

This commit is contained in:
Phxntxm 2017-03-26 21:10:08 -05:00
parent 75029b9abb
commit 586e0e45f8

View file

@ -45,7 +45,7 @@ class Core:
cmd = self.bot.get_command(message)
if cmd is None:
entries = sorted([cmd.qualified_name for cmd in utils.get_all_commands(self.bot)])
entries = sorted([cmd.qualified_name for cmd in utils.get_all_commands(self.bot) if cmd.can_run(ctx)])
try:
pages = utils.Pages(self.bot, message=ctx.message, entries=entries)
await pages.paginate(start_page=page)