1
0
Fork 0
mirror of synced 2024-06-03 03:04:33 +12:00

Added a check in case embeds/reactions can't be used for the help message, and sent the link to the rtd docs instead

This commit is contained in:
phxntxm 2017-01-24 14:45:17 -06:00
parent 9f2b68a291
commit fa82e5403a

View file

@ -172,9 +172,15 @@ class Core:
cmd = None
page = 1
if message is None:
message = ""
else:
perms = self.bot.permissions_in(ctx.message.channel)
if not (perms.embed_links and perms.add_reactions):
fmt = "I need the permissions `embed_links` and `add_reactions` to send my help message! " \
" Otherwise you can use this link to view available commands {}".format(
"http://bonfirebot.readthedocs.io/en/latest/")
await self.bot.say(fmt)
if message is not None:
# If something is provided, it can either be the page number or a command
# Try to convert to an int (the page number), if not, then a command should have been provided
try: