-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
29 lines (23 loc) · 816 Bytes
/
bot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import asyncio
import logging
import discord
from cogs.command_error_handler import CommandErrorHandler
from cogs.robomoji import RobomojiCog
from cogs.sync import mk_sync
from cogs.underpeel import Underpeel
from config import CONFIG, SECRETS
from models.bot import Bot
async def main():
bot = Bot()
no_color_formatter = logging.Formatter('{levelname:<8} | {name}: {message}', style='{')
if CONFIG['production_mode']:
discord.utils.setup_logging(formatter=no_color_formatter)
else:
discord.utils.setup_logging()
await bot.add_cog(CommandErrorHandler(bot))
await bot.add_cog(RobomojiCog(bot))
bot.tree.add_command(mk_sync(bot))
bot.tree.add_command(Underpeel(bot))
await bot.start(SECRETS['DISCORD_TOKEN'])
if __name__ == '__main__':
asyncio.run(main())