2020-06-03 01:07:43 +02:00
|
|
|
import logging
|
|
|
|
|
|
|
|
from discord.ext import commands
|
|
|
|
|
|
|
|
from .logs import Logs, GatewayHandler, on_error
|
2020-06-05 00:29:14 +02:00
|
|
|
from ...core.bot import Tux
|
2020-06-03 01:07:43 +02:00
|
|
|
|
|
|
|
|
2020-06-05 00:29:14 +02:00
|
|
|
def setup(bot: Tux):
|
2020-06-03 01:07:43 +02:00
|
|
|
cog = Logs(bot)
|
|
|
|
bot.add_cog(cog)
|
|
|
|
|
|
|
|
handler = GatewayHandler(cog)
|
|
|
|
logging.getLogger().addHandler(handler)
|
|
|
|
commands.AutoShardedBot.on_error = on_error
|