-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
29 lines (25 loc) · 937 Bytes
/
main.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
#!/usr/bin/env python
from discord.ext import commands
from config.keyconfig import KEY
import logging
import discord
bot = commands.Bot(command_prefix="!?",
description="Discord bot to deal with touhou stuff",
pm_help=True)
logger = logging.getLogger("discord")
logger.setLevel(logging.WARNING)
handler = logging.FileHandler(filename='discord.log', encoding='utf-8', mode='w')
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
logger.addHandler(handler)
@bot.event
async def on_ready():
print("Logged in as")
print(bot.user.name)
print(bot.user.id)
print("------")
bot.load_extension("cogs.soku")
bot.load_extension("cogs.felix")
bot.load_extension("cogs.romaji")
bot.load_extension("cogs.pixiv")
await bot.change_presence(game=discord.Game(name="Touhou 12.3 Hisoutensoku"))
bot.run(KEY)