-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
30 lines (19 loc) · 657 Bytes
/
Copy pathmain.py
File metadata and controls
30 lines (19 loc) · 657 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
"""Main entry point for the Discord bot."""
import discord
from dotenv import load_dotenv
from src.commands import ALL_COMMANDS
from src.core.bot import Bot
from src.services.environment import Environment
from src.services.logger import get_logger
log = get_logger("Main")
# Load environment variables
load_dotenv()
def main() -> None:
Environment.validate()
config = Environment.get_config()
log.info("Initializing bot with %d commands", len(ALL_COMMANDS))
intents = discord.Intents.default()
bot = Bot(ALL_COMMANDS, intents=intents)
bot.run(config.discord_token, log_handler=None)
if __name__ == "__main__":
main()