aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Shirayuki Nekomata <[email protected]>2019-12-09 13:26:12 +0700
committerGravatar GitHub <[email protected]>2019-12-09 13:26:12 +0700
commit0d6bada00b08d55071433f3a8664bec7a8399b27 (patch)
tree4cf3a079a387b5263c5850f15c1c59ee97f7f75a
parentAdded optional channel parameter to !echo: (diff)
parentEnsure hidden_channels and bypass_roles use a list when not passed. (diff)
Merge pull request #682 from manusaurio/master
Ensure hidden_channels and bypass_roles use a list when not passed.
-rw-r--r--bot/decorators.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/decorators.py b/bot/decorators.py
index 61587f406..2d18eaa6a 100644
--- a/bot/decorators.py
+++ b/bot/decorators.py
@@ -38,6 +38,9 @@ def in_channel(
Hidden channels are channels which will not be displayed in the InChannelCheckFailure error
message.
"""
+ hidden_channels = hidden_channels or []
+ bypass_roles = bypass_roles or []
+
def predicate(ctx: Context) -> bool:
"""In-channel checker predicate."""
if ctx.channel.id in channels or ctx.channel.id in hidden_channels: