aboutsummaryrefslogtreecommitdiffstats
path: root/bot/bot.py
diff options
context:
space:
mode:
authorGravatar kosayoda <[email protected]>2019-08-05 21:32:31 +0800
committerGravatar kosayoda <[email protected]>2019-08-05 21:32:31 +0800
commiteb10679be3e53f73cf8b34789971000ec597c10a (patch)
treec48254484357c46a3e7ccdb8b9d2e12e324d1adb /bot/bot.py
parentUnify constants file quotation use (diff)
Move bot out of constants.py to bot.py
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)