1
0
Fork 0
mirror of https://github.com/uhIgnacio/EmoteManager.git synced 2024-08-04 01:42:36 +00:00
EmoteManager/bot.py
2018-07-29 22:49:08 -05:00

24 lines
550 B
Python
Executable file

#!/usr/bin/env python3
# encoding: utf-8
import discord
from discord.ext import commands
with open('config.py') as f:
config = eval(f.read(), {})
class Bot(commands.AutoShardedBot):
def __init__(self, **kwargs):
super().__init__(command_prefix=commands.when_mentioned, **kwargs)
for cog in config['cogs']:
self.load_extension(cog)
async def on_ready(self):
print('Logged on as {0} (ID: {0.id})'.format(self.user))
bot = Bot()
if __name__ == '__main__':
bot.run(config['tokens'].pop('discord'))