1
0
Fork 0
mirror of https://github.com/uhIgnacio/EmoteManager.git synced 2024-08-15 02:23:13 +00:00

add bot from discord template

This commit is contained in:
bmintz 2018-07-29 22:48:58 -05:00
parent 5683490ab6
commit 5188b6f729
2 changed files with 23 additions and 0 deletions

23
bot.py Executable file
View file

@ -0,0 +1,23 @@
#!/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'))

0
cogs/__init__.py Normal file
View file