diff options
| author | 2019-08-13 20:04:10 -0400 | |
|---|---|---|
| committer | 2019-08-13 20:04:10 -0400 | |
| commit | d2a8e1caf351601071f2a96715a7f9d95a1e69fb (patch) | |
| tree | 3f94c3c965fc3a4d42b36dafeb9bab6abcaf3462 /bot/bot.py | |
| parent | Merge pull request #254 from jakeHebert/master (diff) | |
| parent | Fix 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 '')
| -rw-r--r-- | bot/bot.py | 9 | 
1 files changed, 6 insertions, 3 deletions
| @@ -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) | 
