-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
33 lines (26 loc) · 873 Bytes
/
main.py
File metadata and controls
33 lines (26 loc) · 873 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
32
33
import discord
from utils.loader.config_loader import ConfigLoader
from utils.loader.extension_loader import ExtensionLoader
from utils.database import DBManager
from utils.subclass.bot import CustomBot
# intents = discord.Intents.default()
# intents.members = True
# intents.message_content = True
aConfig = ConfigLoader()
bot = CustomBot(
command_prefix = aConfig.get_prefix(),
intents = discord.Intents.default()
)
bot.database = DBManager()
bot.config = aConfig
@bot.event
async def on_ready():
await bot.change_presence(
status=discord.Status.do_not_disturb,
activity=discord.Game("https://github.com/PapyMonkey/mpu")
)
print(f'{bot.user} has been successfully connected to Discord.')
if (__name__ == '__main__'):
aExtLoader = ExtensionLoader(bot)
aExtLoader.load_extensions()
bot.run(bot.config.get_access_token())