mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fixes based on review feedback
This commit is contained in:
parent
2559d27ae9
commit
5e9c1e3413
3 changed files with 12 additions and 4 deletions
|
|
@ -460,6 +460,7 @@ class Dispatcher(Router):
|
|||
:param polling_timeout: Poling timeout
|
||||
:param backoff_config:
|
||||
:param handle_as_tasks: Run task for each event and no wait result
|
||||
:param allowed_updates: List of the update types you want your bot to receive
|
||||
:param kwargs: contextual data
|
||||
:return:
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ from typing import List, cast
|
|||
from aiogram.dispatcher.dispatcher import Dispatcher
|
||||
from aiogram.dispatcher.router import Router
|
||||
|
||||
AIOGRAM_INTERNAL_HANDLERS = [
|
||||
INTERNAL_HANDLERS = [
|
||||
"update",
|
||||
"error",
|
||||
]
|
||||
|
||||
|
||||
def get_handlers_in_use(
|
||||
dispatcher: Dispatcher, handlers_to_skip: List[str] = AIOGRAM_INTERNAL_HANDLERS
|
||||
dispatcher: Dispatcher, handlers_to_skip: List[str] = INTERNAL_HANDLERS
|
||||
) -> List[str]:
|
||||
handlers_in_use: List[str] = []
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,15 @@ async def command_start_handler(message: Message) -> None:
|
|||
This handler receive messages with `/start` command
|
||||
"""
|
||||
|
||||
await message.answer(f"Hello, <b>{message.from_user.full_name}!</b>", reply_markup=InlineKeyboardMarkup(inline_keyboard=[[InlineKeyboardButton(text="Tap me, bro", callback_data="*")]]))
|
||||
await message.answer(f"Hello, <b>{message.from_user.full_name}!</b>",
|
||||
reply_markup=InlineKeyboardMarkup(
|
||||
inline_keyboard=[
|
||||
[
|
||||
InlineKeyboardButton(text="Tap me, bro", callback_data="*")
|
||||
]
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@dp.chat_member()
|
||||
|
|
@ -33,7 +41,6 @@ sub_router = Router()
|
|||
async def callback_tap_me(callback_query: CallbackQuery) -> None:
|
||||
await callback_query.answer("Yeah good, now i'm fine")
|
||||
|
||||
|
||||
# this router will use only edited_message updates
|
||||
sub_sub_router = Router()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue