-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.py
More file actions
41 lines (32 loc) · 1.1 KB
/
Copy pathmain.py
File metadata and controls
41 lines (32 loc) · 1.1 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
"""Entry point for tcs-utils-dcbot.
Sets up logging, loads cog extensions, and starts the bot. All commands and
event handlers live in the ``cogs/`` package; ``modules/`` holds the business
logic.
``modules.verification`` is imported for its side-effect of self-registering
its own ``@bot.listen`` / ``@tasks.loop`` hooks at import time. That wiring
has not yet moved into a cog — see "Phase 2.5" in the refactor plan, which
will migrate it once Phase 5 lands the pure-logic test suite.
"""
import asyncio
import modules.verification # noqa: F401 -- side-effect: registers @bot.listen / @tasks.loop
from modules import config, logging_config
from modules.bot_init import bot
logging_config.setup()
bot.pings = True
EXTENSIONS: list[str] = [
'cogs.core',
'cogs.moderation',
'cogs.activity',
'cogs.points',
'cogs.saves',
'cogs.server_events',
'cogs.challenges',
'cogs.verification',
]
async def main():
async with bot:
for ext in EXTENSIONS:
await bot.load_extension(ext)
await bot.start(config.TOKEN)
if __name__ == '__main__':
asyncio.run(main())