aboutsummaryrefslogtreecommitdiffstats
path: root/bot/__main__.py
diff options
context:
space:
mode:
authorGravatar kosayoda <[email protected]>2019-08-06 00:12:17 +0800
committerGravatar kosayoda <[email protected]>2019-08-06 00:23:51 +0800
commit9bd8ac2ea92ee99b486b3f3bdf8872c7bfbbc38b (patch)
treeef205d9cfdad85a8fb0aa5ef5b45365e40689841 /bot/__main__.py
parentSplit in_channel's predicate and check, add bypass_roles functionality (diff)
Add global check to SeasonalBot
Diffstat (limited to 'bot/__main__.py')
-rw-r--r--bot/__main__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/__main__.py b/bot/__main__.py
index 416bca35..9dc0b173 100644
--- a/bot/__main__.py
+++ b/bot/__main__.py
@@ -1,9 +1,11 @@
import logging
from bot.bot import bot
-from bot.constants import Client
+from bot.constants import Client, STAFF_ROLES, WHITELISTED_CHANNELS
+from bot.decorators import in_channel_check
log = logging.getLogger(__name__)
+bot.add_check(in_channel_check(*WHITELISTED_CHANNELS, bypass_roles=STAFF_ROLES))
bot.load_extension("bot.seasons")
bot.run(Client.token)