From 447942989aeb159bd1b52db3258b428c57c76376 Mon Sep 17 00:00:00 2001 From: floordiv Date: Tue, 13 Apr 2021 00:34:17 +0300 Subject: [PATCH] aiogram.types.inline_keyboard: fixed getting attribute `keyboard` from `other` but InlineKeyboardMarkup has `inline_keyboard` attribute instead --- aiogram/types/inline_keyboard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aiogram/types/inline_keyboard.py b/aiogram/types/inline_keyboard.py index a9545f61..9ed21085 100644 --- a/aiogram/types/inline_keyboard.py +++ b/aiogram/types/inline_keyboard.py @@ -86,9 +86,9 @@ class InlineKeyboardMarkup(base.TelegramObject): def __iadd__(self, other): return self.add(other) - def __add__(self, other): + def __add__(self, other: self.__class__): return self.__class__( - inline_keyboard=self.inline_keyboard + other.keyboard, + inline_keyboard=self.inline_keyboard + other.inline_keyboard, row_width=self.row_width, conf=self.conf, **self.other_kwargs