diff --git a/aiogram/types/inline_keyboard.py b/aiogram/types/inline_keyboard.py index 97ad35da..8ba946e7 100644 --- a/aiogram/types/inline_keyboard.py +++ b/aiogram/types/inline_keyboard.py @@ -23,6 +23,7 @@ class InlineKeyboardMarkup(base.TelegramObject): conf = kwargs.pop('conf', {}) or {} conf['row_width'] = row_width + self.other_kwargs = kwargs super(InlineKeyboardMarkup, self).__init__(**kwargs, conf=conf, @@ -82,6 +83,17 @@ class InlineKeyboardMarkup(base.TelegramObject): self.add(button) return self + def __iadd__(self, other): + return self.add(other) + + def __add__(self, other): + return InlineKeyboardMarkup( + inline_keyboard=self.inline_keyboard, + row_width=self.row_width, + conf=self.conf, + **self.other_kwargs + ) + class InlineKeyboardButton(base.TelegramObject): """