mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Fix incorrect type checking in KeyboardBuilder
This commit is contained in:
parent
18a93aab60
commit
485b9836d3
1 changed files with 1 additions and 1 deletions
|
|
@ -232,7 +232,7 @@ class KeyboardBuilder(Generic[ButtonType]):
|
|||
return self.add(button)
|
||||
|
||||
def as_markup(self, **kwargs: Any) -> Union[InlineKeyboardMarkup, ReplyKeyboardMarkup]:
|
||||
if self._button_type is ReplyKeyboardMarkup:
|
||||
if self._button_type is KeyboardButton:
|
||||
return ReplyKeyboardMarkup(keyboard=self.export(), **kwargs)
|
||||
return InlineKeyboardMarkup(inline_keyboard=self.export())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue