-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
32 lines (23 loc) · 840 Bytes
/
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
"""This module contains the main entry point for the bot."""
from asyncio import set_event_loop_policy
from os import name
from hikari import StartedEvent
from commands.ping import ping
from instances.bot import bot, client
from instances.log import logger
from passive.presence import presence
if name != "nt":
try:
from uvloop import EventLoopPolicy
set_event_loop_policy(policy=EventLoopPolicy())
logger.trace("Using uvloop event loop policy")
except ImportError:
logger.warning("Failed to import uvloop, using default event loop policy")
logger.success("Starting Matter")
logger.trace("Including slash commands")
client.include(command=ping)
logger.trace("Setting presence")
bot.listen(StartedEvent)(presence)
logger.trace("Starting bot")
bot.run()
logger.success("Matter has stopped!")