diff options
Diffstat (limited to 'bot/bot.py')
-rw-r--r-- | bot/bot.py | 17 |
1 files changed, 3 insertions, 14 deletions
@@ -5,8 +5,7 @@ from typing import List from aiohttp import AsyncResolver, ClientSession, TCPConnector from discord import Embed -from discord.ext import commands -from discord.ext.commands import Bot, Cog +from discord.ext.commands import Bot from bot import constants @@ -19,10 +18,7 @@ class SeasonalBot(Bot): def __init__(self, **kwargs): super().__init__(**kwargs) self.http_session = ClientSession( - connector=TCPConnector( - resolver=AsyncResolver(), - family=socket.AF_INET, - ) + connector=TCPConnector(resolver=AsyncResolver(), family=socket.AF_INET) ) def load_extensions(self, exts: List[str]): @@ -49,6 +45,7 @@ class SeasonalBot(Bot): """ Send an embed message to the devlog channel """ + devlog = self.get_channel(constants.Channels.devlog) if not devlog: @@ -62,11 +59,3 @@ class SeasonalBot(Bot): embed.set_author(name=title, icon_url=icon) await devlog.send(embed=embed) - - @Cog.listener() - async def on_command_error(self, context, exception): - # Don't punish the user for getting the arguments wrong - if isinstance(exception, commands.UserInputError): - context.command.reset_cooldown(context) - else: - await super().on_command_error(context, exception) |