mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 09:55:21 +00:00
Add return self to the InlineKeyboardMarkup's insert method
This commit is contained in:
parent
7d80475942
commit
82b35acf52
1 changed files with 3 additions and 0 deletions
|
|
@ -66,11 +66,14 @@ class InlineKeyboardMarkup(base.TelegramObject):
|
|||
Insert button to last row
|
||||
|
||||
:param button:
|
||||
:return: self
|
||||
:rtype: :obj:`types.InlineKeyboardMarkup`
|
||||
"""
|
||||
if self.inline_keyboard and len(self.inline_keyboard[-1] < self.row_width):
|
||||
self.inline_keyboard[-1].append(button)
|
||||
else:
|
||||
self.add(button)
|
||||
return self
|
||||
|
||||
|
||||
class InlineKeyboardButton(base.TelegramObject):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue