diff --git a/client/src/telethon/_impl/client/client/files.py b/client/src/telethon/_impl/client/client/files.py index 78a97865..065cd994 100644 --- a/client/src/telethon/_impl/client/client/files.py +++ b/client/src/telethon/_impl/client/client/files.py @@ -317,7 +317,7 @@ async def do_send_file( media=input_media, message=message, random_id=random_id, - reply_markup=buttons.build() if buttons is not None else None, + reply_markup=buttons._build() if buttons is not None else None, entities=entities, schedule_date=None, send_as=None, diff --git a/client/src/telethon/_impl/client/client/messages.py b/client/src/telethon/_impl/client/client/messages.py index 95d2db23..6ccbac7a 100644 --- a/client/src/telethon/_impl/client/client/messages.py +++ b/client/src/telethon/_impl/client/client/messages.py @@ -78,7 +78,7 @@ async def send_message( ), message=message, random_id=random_id, - reply_markup=buttons.build() if buttons is not None else None, + reply_markup=buttons._build() if buttons is not None else None, entities=entities, schedule_date=None, send_as=None, @@ -141,7 +141,7 @@ async def edit_message( id=message_id, message=message, media=None, - reply_markup=buttons.build() if buttons is not None else None, + reply_markup=buttons._build() if buttons is not None else None, entities=entities, schedule_date=None, ) diff --git a/client/src/telethon/_impl/client/types/buttons/reply_markup.py b/client/src/telethon/_impl/client/types/buttons/reply_markup.py index 7d25eaa8..db3cabe0 100644 --- a/client/src/telethon/_impl/client/types/buttons/reply_markup.py +++ b/client/src/telethon/_impl/client/types/buttons/reply_markup.py @@ -47,7 +47,7 @@ class ReplyKeyboardMarkup: self.persistent = persistent self.placeholder = placeholder - def build(self) -> abcs.ReplyMarkup: + def _build(self) -> abcs.ReplyMarkup: return types.ReplyKeyboardMarkup( resize=self.resize, single_use=self.single_use, @@ -64,7 +64,7 @@ class ReplyInlineMarkup: def __init__(self, btns: list[Button] | list[list[Button]]) -> None: self._btns = build_keyboard_rows(btns) - def build(self) -> abcs.ReplyMarkup: + def _build(self) -> abcs.ReplyMarkup: return types.ReplyInlineMarkup(rows=self._btns)