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:
parent
9f2b68a291
commit
fa82e5403a
12
cogs/core.py
12
cogs/core.py
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue