-
Notifications
You must be signed in to change notification settings - Fork 35
/
main.py
34 lines (27 loc) · 782 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
from loguru import logger
import colorama
import os
import sys
import asyncio
from telegram_channel_duplicator.duplicator import Duplicator
async def main():
logger.remove()
logger.add(
sys.stderr,
format="<cyan>{time}</cyan> | <lvl>{level}</lvl> - <lvl>{message}</lvl>",
colorize=True,
level="DEBUG",
)
logger.add(
os.path.join("logs", "debug.log"),
format="{time} {level} {message}",
level="DEBUG",
rotation="3mb",
compression="zip",
)
logger.info(colorama.Fore.LIGHTYELLOW_EX + "Created by https://github.com/deFiss")
duplicator = Duplicator()
await duplicator.start()
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())