misc: code consistency and bot instance creation

This commit is contained in:
sdmway 2024-05-07 20:14:38 -06:00
parent a7d3e9a720
commit df1ab06762
11 changed files with 32 additions and 20 deletions

View file

@ -16,6 +16,8 @@ from aiogram.types import (
ReplyKeyboardRemove,
)
TOKEN = getenv("BOT_TOKEN")
BUTTON_CANCEL = KeyboardButton(text="❌ Cancel")
BUTTON_BACK = KeyboardButton(text="🔙 Back")
@ -199,5 +201,5 @@ if __name__ == "__main__":
# Recommended to use CLI instead of this snippet.
# `aiogram run polling scene_example:create_dispatcher --token BOT_TOKEN --log-level info`
dp = create_dispatcher()
bot = Bot(token=getenv("TELEGRAM_TOKEN"))
dp.run_polling()
bot = Bot(token=TOKEN)
dp.run_polling(bot)