"""Create the basic bot for plugins to hook onto.""" import logging from discord.ext import commands import hitomi.config BOT_DESCRIPTION = "A simple Discord bot." logger = logging.getLogger(__name__) class Hitomi(commands.Bot): """Extend the discord.py Bot, to add more cool stuff.""" def __init__(self, *args, **kwargs): """Initialize bot, and cool stuff.""" super(Hitomi, self).__init__(*args, **kwargs) self.on_message_handlers = [] bot = Hitomi(command_prefix=hitomi.config.BOT_COMMAND_PREFIX, description=BOT_DESCRIPTION, max_messages=hitomi.config.BOT_MAX_MESSAGES) @bot.event async def on_ready(): """Print some basic login info to the console, when the bot connects.""" logger.info("Logged in as %s (%d)", bot.user.name, bot.user.id)