forked from notnotmelon/skyblock-simplified
-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.py
31 lines (26 loc) · 791 Bytes
/
run.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
30
31
import traceback
import sys
import discord
import os
import asyncio
from bot import Bot
import config
# On Windows, the selector event loop is required for aiodns.
if os.name == "nt":
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
client = Bot(
command_prefix=config.BOT_PREFIXES,
description='Skyblock Simplified',
owner_ids=config.OWNER_IDS,
case_insensitive=True,
max_messages=None,
fetch_offline_members=False,
activity=discord.Game(f'| 🍤 {config.BOT_PREFIXES[-1]} help')
)
for extension in config.COG_EXTENSIONS:
try:
client.load_extension(extension)
except Exception:
print(f'Failed to load extension {extension}.', file=sys.stderr)
traceback.print_exc()
client.run(config.DISCORD_TOKEN)