This repository has been archived on 2024-08-21. You can view files and clone it, but cannot push or open issues or pull requests.
BWTAqua/bwtbot.py
2023-05-16 20:50:18 +02:00

38 lines
625 B
Python

import logging
from os import getpid
from convopyro import Conversation
from modules.app import PyroClient
logging.basicConfig(
level=logging.INFO,
format="%(name)s.%(funcName)s | %(levelname)s | %(message)s",
datefmt="[%X]",
)
logger = logging.getLogger(__name__)
try:
import uvloop
uvloop.install()
except ImportError:
pass
def main():
client = PyroClient()
Conversation(client)
try:
client.run()
except KeyboardInterrupt:
logger.warning(f"Forcefully shutting down with PID {getpid()}...")
finally:
exit()
if __name__ == "__main__":
main()