-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.py
More file actions
69 lines (54 loc) · 1.72 KB
/
index.py
File metadata and controls
69 lines (54 loc) · 1.72 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import discord
import variables
from cogs.commands.dpwiki import DPWikiCommand
from cogs.commands.folderstructure import FolderStructureCommand
from cogs.commands.help import HelpCommand
from cogs.commands.info import InfoCommand
from cogs.commands.link import LinkCommand
from cogs.commands.packformat import PackFormatCommand
from cogs.commands.template import TemplateCommand
from cogs.commands.vanilla import VanillaCommand
from cogs.events.on_message import OnMessage
from cogs.misc.admin import AdminCommands
from utils.log import setup_logger
# Logger setup
logger = setup_logger(__name__)
# intents
intents = discord.Intents.default()
intents.message_content = True
client = discord.Bot(
intents=intents,
activity=discord.Activity(
name="out for your commands",
type=discord.ActivityType.watching,
),
default_command_integration_types={
discord.IntegrationType.guild_install,
discord.IntegrationType.user_install,
},
)
logger.info("Setting up bot...")
# Commands
logger.info("Adding command cogs...")
client.add_cog(LinkCommand(client))
client.add_cog(TemplateCommand(client))
client.add_cog(InfoCommand(client))
client.add_cog(FolderStructureCommand(client))
client.add_cog(VanillaCommand(client))
client.add_cog(PackFormatCommand(client))
client.add_cog(HelpCommand(client))
client.add_cog(DPWikiCommand(client))
logger.info("Command cogs added.")
# Events
@client.event
async def on_ready():
logger.info("Bot is ready!")
logger.info("Adding event cogs...")
client.add_cog(OnMessage(client))
# Misc Cogs
client.add_cog(AdminCommands(client))
logger.info("Event cogs added.")
logger.info("Bot setup complete.")
logger.info("Logging in...")
# Run the bot
client.run(variables.TOKEN)