aiogram.types.reply_keyboard: using self.__class__ instead of explicit ReplyKeyboardMarkup class initializing

This commit is contained in:
floordiv 2021-04-12 15:22:57 +03:00
parent 6a342dd0a8
commit 8589aa1572

View file

@ -94,7 +94,7 @@ class ReplyKeyboardMarkup(base.TelegramObject):
return self.add(other)
def __add__(self, other):
return ReplyKeyboardMarkup(
return self.__class__(
keyboard=self.keyboard + other.keyboard, resize_keyboard=self.resize_keyboard,
one_time_keyboard=self.one_time_keyboard, selective=self.selective,
row_width=self.row_width