Skip to content

Commit

Permalink
Temp fix: REPLY_MARKUP_TOO_LONG
Browse files Browse the repository at this point in the history
  • Loading branch information
Itz-fork committed Jul 31, 2022
1 parent 05a2d18 commit 1f85765
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions unzipper/helpers_nexa/buttons.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ async def make_files_keyboard(self, files: list, user_id: int, chat_id: int):
data = [InlineKeyboardButton(STRINGS["buttons"]["upload_all"], f"ext_a|{user_id}|{chat_id}"), InlineKeyboardButton(
STRINGS["buttons"]["cancel"], "cancel_dis")]
for num, file in enumerate(files):
# Temp fix for REPLY_MARKUP_TOO_LONG error
if num >= 90:
break
data.append(
InlineKeyboardButton(f"{num} - {basename(file)}".encode(
"utf-8").decode("utf-8"), f"ext_f|{user_id}|{chat_id}|{num}")
)
# Temp fix for REPLY_MARKUP_TOO_LONG error
if len(data) >= 90:
data = data[:90]
i_kbd.add(*data)
return i_kbd

Expand Down

0 comments on commit 1f85765

Please sign in to comment.