[+] Permission System (into bot)

[+] MultiServer System
[+] (bot) perms_handler
[+] (hosts) new api
[+] IN_DOCKER
[+] Signals handlers
[+] easydict
[~] Version 1.3.0 -> 2.0.0
[~] (perms) Update is_allow
This commit is contained in:
2024-01-17 05:59:28 +03:00
parent 2237582f80
commit fc3279acfe

View File

@@ -1,17 +1,22 @@
import sys
import platform
import signal
from loguru import logger
from core import Bot
from modules import enter_to_exit
from modules import enter_to_exit, IN_DOCKER
if __name__ == '__main__':
bot = Bot()
signal.signal(signal.SIGTERM, bot.stop)
signal.signal(signal.SIGINT, bot.stop)
if platform.system() == 'Windows':
signal.signal(signal.SIGBREAK, bot.stop)
elif not IN_DOCKER:
signal.signal(signal.SIGKILL, bot.stop)
signal.signal(signal.SIGHUP, bot.stop)
try:
bot.listen()
except KeyboardInterrupt:
logger.info("Exited.")
sys.exit(0)
except Exception as e:
logger.exception(e)
enter_to_exit()