1
0
mirror of https://github.com/civsocit/olgram.git synced 2025-12-17 16:06:17 +00:00

fix group chat remove, some minor fixes

This commit is contained in:
mihalin
2021-09-17 11:35:51 +03:00
parent cb05f9d1fa
commit 9f32edd1be
3 changed files with 12 additions and 7 deletions

View File

@@ -20,3 +20,10 @@ async def edit_or_create(call: CallbackQuery, message: str,
except TelegramAPIError: # кнопка устарела
await call.bot.send_message(call.message.chat.id, text=message, reply_markup=reply_markup,
parse_mode=parse_mode)
def button_text_limit(data: str) -> str:
max_len = 30
if len(data) > max_len:
data = data[:max_len-4] + "..."
return data