Skip to content

Commit

Permalink
impr: longer caption when replying with file
Browse files Browse the repository at this point in the history
  • Loading branch information
nalgeon committed Apr 13, 2024
1 parent f619791 commit b10bfdd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bot/askers.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ async def reply(self, message: Message, context: CallbackContext, answer: str) -

doc = io.StringIO(answer)
caption = (
textwrap.shorten(answer, width=40, placeholder="...") + " (see attachment for the rest)"
textwrap.shorten(answer, width=255, placeholder="...")
+ " (see attachment for the rest)"
)
reply_to_message_id = message.id if message.chat.type != Chat.PRIVATE else None
await context.bot.send_document(
Expand Down

0 comments on commit b10bfdd

Please sign in to comment.