From eb10679be3e53f73cf8b34789971000ec597c10a Mon Sep 17 00:00:00 2001 From: kosayoda Date: Mon, 5 Aug 2019 21:32:31 +0800 Subject: Move bot out of constants.py to bot.py --- bot/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bot/__main__.py') diff --git a/bot/__main__.py b/bot/__main__.py index a3b68ec1..416bca35 100644 --- a/bot/__main__.py +++ b/bot/__main__.py @@ -1,6 +1,7 @@ import logging -from bot.constants import Client, bot +from bot.bot import bot +from bot.constants import Client log = logging.getLogger(__name__) -- cgit v1.2.3 From 9bd8ac2ea92ee99b486b3f3bdf8872c7bfbbc38b Mon Sep 17 00:00:00 2001 From: kosayoda Date: Tue, 6 Aug 2019 00:12:17 +0800 Subject: Add global check to SeasonalBot --- bot/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bot/__main__.py') 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) -- cgit v1.2.3