Refactor and improve bot messages

Refactored bot code to use aiogram enumerations and enhanced chat messages with markdown beautifications for a more user-friendly display.

CommandStart() is now used instead of Command('start') for readability.

Furthermore, the bot's 'stop' command was improved, ensuring it executes appropriately during KeyboardInterrupt or SystemExit.

Additionally, the bot's logging was adjusted to output to sys.stdout for better logs' readability.
This commit is contained in:
latan 2023-08-10 11:46:22 +03:00
parent 68c0516f69
commit 518739724c
7 changed files with 63 additions and 45 deletions

View file

@ -1,4 +1,5 @@
import logging
import sys
from os import getenv
from aiohttp.web import run_app
@ -45,5 +46,5 @@ def main():
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
logging.basicConfig(level=logging.INFO, stream=sys.stdout)
main()