mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
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:
parent
68c0516f69
commit
518739724c
7 changed files with 63 additions and 45 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue