aboutsummaryrefslogtreecommitdiffstats
path: root/bot/bot.py
diff options
context:
space:
mode:
authorGravatar S. Co1 <[email protected]>2019-08-13 20:04:10 -0400
committerGravatar GitHub <[email protected]>2019-08-13 20:04:10 -0400
commitd2a8e1caf351601071f2a96715a7f9d95a1e69fb (patch)
tree3f94c3c965fc3a4d42b36dafeb9bab6abcaf3462 /bot/bot.py
parentMerge pull request #254 from jakeHebert/master (diff)
parentFix indent style and reduce logging message verbosity (diff)
Merge pull request #251 from python-discord/seasonalbot-commands
Limit SeasonalBot commands to whitelisted channels
Diffstat (limited to 'bot/bot.py')
-rw-r--r--bot/bot.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/bot/bot.py b/bot/bot.py
index 24e919f2..86028838 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -7,11 +7,11 @@ from aiohttp import AsyncResolver, ClientSession, TCPConnector
from discord import Embed
from discord.ext import commands
-from bot import constants
+from bot.constants import Channels, Client
log = logging.getLogger(__name__)
-__all__ = ('SeasonalBot',)
+__all__ = ('SeasonalBot', 'bot')
class SeasonalBot(commands.Bot):
@@ -42,7 +42,7 @@ class SeasonalBot(commands.Bot):
async def send_log(self, title: str, details: str = None, *, icon: str = None):
"""Send an embed message to the devlog channel."""
- devlog = self.get_channel(constants.Channels.devlog)
+ devlog = self.get_channel(Channels.devlog)
if not devlog:
log.warning("Log failed to send. Devlog channel not found.")
@@ -62,3 +62,6 @@ class SeasonalBot(commands.Bot):
context.command.reset_cooldown(context)
else:
await super().on_command_error(context, exception)
+
+
+bot = SeasonalBot(command_prefix=Client.prefix)