aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar SebastiaanZ <[email protected]>2019-01-09 19:05:06 +0100
committerGravatar SebastiaanZ <[email protected]>2019-01-09 19:05:06 +0100
commite61a818b394a40185b934d67fe7a2a943edf81fc (patch)
treed292d5f0184ce8a20720be9a7100a1629aab5082
parentMerge pull request #261 from python-discord/guild-whitelist (diff)
Patch to make \!help work outside of #bot-commands again. We should look into a proper rewrite later.
-rw-r--r--bot/cogs/help.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/bot/cogs/help.py b/bot/cogs/help.py
index d30ff0dfb..c82a25417 100644
--- a/bot/cogs/help.py
+++ b/bot/cogs/help.py
@@ -9,11 +9,13 @@ from discord.ext import commands
from fuzzywuzzy import fuzz, process
from bot import constants
+from bot.decorators import InChannelCheckFailure
from bot.pagination import (
DELETE_EMOJI, FIRST_EMOJI, LAST_EMOJI,
LEFT_EMOJI, LinePaginator, RIGHT_EMOJI,
)
+
REACTIONS = {
FIRST_EMOJI: 'first',
LEFT_EMOJI: 'back',
@@ -427,7 +429,15 @@ class HelpSession:
# see if the user can run the command
strikeout = ''
- can_run = await command.can_run(self._ctx)
+
+ # Patch to make the !help command work outside of #bot-commands again
+ # This probably needs a proper rewrite, but this will make it work in
+ # the mean time.
+ try:
+ can_run = await command.can_run(self._ctx)
+ except InChannelCheckFailure:
+ can_run = False
+
if not can_run:
# skip if we don't show commands they can't run
if self._only_can_run: