forked from cittyinthecloud/NatsukiBotV2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
41 lines (34 loc) · 1 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
import logging
import sys
import traceback
from discord.ext import commands
from discord.ext.commands import Bot
from SECRET import token
# cause stupid gateway crap
import discord
# tells discord we use presence, members, messages, and guild logging intents
intents = discord.Intents(presences=True, members=True, messages=True, guilds=True)
initial_extensions = [
"cogs.owner",
"cogs.roles",
"cogs.error",
"cogs.suggestions",
"cogs.fun",
"cogs.gulag",
"cogs.basics",
"cogs.mod",
"cogs.automod",
"cogs.blacklist",
"cogs.remind"
]
logging.basicConfig(level=logging.INFO)
bot: Bot = commands.Bot(command_prefix=commands.when_mentioned_or("!"), intents=intents)
if __name__ == '__main__':
for extension in initial_extensions:
# noinspection PyBroadException
try:
bot.load_extension(extension)
except Exception:
print(f'Failed to load extension {extension}.', file=sys.stderr)
traceback.print_exc()
bot.run(token)