2020-06-03 01:07:43 +02:00
|
|
|
import logging
|
2020-06-06 18:51:47 +02:00
|
|
|
from collections import namedtuple
|
2020-06-03 01:07:43 +02:00
|
|
|
|
|
|
|
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-06 18:51:47 +02:00
|
|
|
VersionInfo = namedtuple("VersionInfo", "major minor micro releaselevel")
|
|
|
|
version_info = VersionInfo(major=2, minor=0, micro=0, releaselevel="alpha")
|
|
|
|
|
|
|
|
__version__ = "v{}.{}.{}-{}".format(
|
|
|
|
version_info.major,
|
|
|
|
version_info.minor,
|
|
|
|
version_info.micro,
|
2020-06-07 17:41:34 +02:00
|
|
|
version_info.releaselevel,
|
2020-06-06 18:51:47 +02:00
|
|
|
).replace("\n", "")
|
|
|
|
|
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
|