-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
28 lines (20 loc) · 669 Bytes
/
main.py
File metadata and controls
28 lines (20 loc) · 669 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
import os
from discord.ext import commands
client = commands.Bot(command_prefix='$', description="YGOPROGBOT")
startup_extensions = [
'config',
'pack_simulator',
'server_data', 'user_data',
'openings'
]
@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))
if __name__ == "__main__":
for extension in startup_extensions:
try:
client.load_extension("extensions." + extension)
except Exception as e:
exc = '{}: {}'.format(type(e).__name__, e)
print('Failed to load extension {}\n{}'.format(extension, exc))
client.run(os.environ['DISCORD_TOKEN'])