-
Notifications
You must be signed in to change notification settings - Fork 1
/
Main.py
37 lines (30 loc) · 1.18 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
import discord
from discord.ext import commands
from discord.ext.commands.core import command
import configparser
settings = configparser.ConfigParser(comment_prefixes='/', allow_no_value=True)
settings.read("settings.ini")
TOKEN = settings['SECRET']['TOKEN']
commandPrefix = settings['DEFAULT']['commandPrefix']
initial_extensions_commands = [
"cogs.commands.helpCommand",
"cogs.commands.voiceCommands",
]
initial_extensions_events = [
"cogs.events.errorHandler",
"cogs.events.on_ready",
]
activity = discord.Activity(type=discord.ActivityType.listening, name=f"{commandPrefix}help")
intents = discord.Intents.all()
client = commands.Bot(command_prefix=commandPrefix,
description="TTS Bot",
help_command=None,
case_insensitive=True,
intents=intents,
activity=activity)
if __name__ == '__main__':
for extension in initial_extensions_commands: # load commands
client.load_extension(extension)
for extension in initial_extensions_events: # load events
client.load_extension(extension)
client.run(TOKEN) # run the bot