-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
39 lines (28 loc) · 658 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
33
34
35
36
37
38
39
'''
Bot setup module
'''
import os
from bot.core import Bot
from config import BotConfig
try:
import hikari
except ModuleNotFoundError:
# Install dependencies if not
os.system('pip install -r requirements.txt')
def main() -> None:
'''
Main process
'''
if os.name != 'nt':
# If a UNIX-like system is used
# It is possible to replace
# the standard asyncio with libuv uvloop
try:
import uvloop
uvloop.install()
except ImportError:
pass
bot = Bot(BotConfig.TOKEN, BotConfig.PREFIX)
bot.run()
if __name__ == "__main__":
main()