2020-10-22 00:00:48 +02:00
|
|
|
import logging
|
|
|
|
from collections import namedtuple
|
|
|
|
|
|
|
|
from discord.ext import commands
|
|
|
|
|
2021-01-20 15:08:16 +01:00
|
|
|
from tuxbot.core.bot import Tux
|
2021-01-27 15:14:05 +01:00
|
|
|
from .logs import Logs, GatewayHandler
|
2020-11-08 01:07:27 +01:00
|
|
|
from .config import LogsConfig, HAS_MODELS
|
2020-10-22 00:00:48 +02:00
|
|
|
|
|
|
|
VersionInfo = namedtuple("VersionInfo", "major minor micro release_level")
|
|
|
|
version_info = VersionInfo(major=1, minor=0, micro=0, release_level="alpha")
|
|
|
|
|
|
|
|
__version__ = "v{}.{}.{}-{}".format(
|
|
|
|
version_info.major,
|
|
|
|
version_info.minor,
|
|
|
|
version_info.micro,
|
|
|
|
version_info.release_level,
|
|
|
|
).replace("\n", "")
|
|
|
|
|
|
|
|
|
|
|
|
def setup(bot: Tux):
|
|
|
|
cog = Logs(bot)
|
|
|
|
bot.add_cog(cog)
|
|
|
|
|
|
|
|
handler = GatewayHandler(cog)
|
|
|
|
logging.getLogger().addHandler(handler)
|