mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
misc: code consistency and bot instance creation
This commit is contained in:
parent
a7d3e9a720
commit
df1ab06762
11 changed files with 32 additions and 20 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue