-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
29 lines (25 loc) · 688 Bytes
/
Copy pathmain.py
File metadata and controls
29 lines (25 loc) · 688 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
import logging
from core import bot
async def main():
logging.basicConfig(
level=logging.WARNING,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
)
logger = logging.getLogger()
logger.setLevel(logging.INFO)
logger.info("initializing userbots...")
await bot.client.start()
logger.info("userbots initializing✓")
logger.info("idling...")
await bot.idle()
logger.info("stopping userbots...")
await bot.client.stop()
logger.info("userbots stopped!")
if __name__ == "__main__":
try:
import uvloop
except ImportError:
pass
else:
uvloop.install()
bot.client.run(main())