forked from noirscape/animotes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (25 loc) · 751 Bytes
/
main.py
File metadata and controls
31 lines (25 loc) · 751 Bytes
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
30
31
import yaml
from discord.ext import commands
config = yaml.safe_load(open('config.yaml'))
bot = commands.Bot(command_prefix=commands.when_mentioned_or(
config['prefix']),
description='A bot to make non Nitro members use non-global Nitro emotes on the servers it is in.',
pm_help=True)
def load_cog(cog):
try:
bot.load_extension(cog)
except Exception as e:
print('Could not load cog ' + cog)
print(e)
@bot.event
async def on_ready():
print('------------')
print('Logged in as:')
print(bot.user.name)
print(bot.user.id)
print('Using prefix:')
print(config['prefix'])
print('------------')
load_cog('animotes')
print('Loaded animotes cog...')
bot.run(config['token'])