Skip to content

Commit

Permalink
feat: auto-split /users message
Browse files Browse the repository at this point in the history
  • Loading branch information
F33RNI committed Apr 5, 2024
1 parent d0f2295 commit 8e5f6a2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bot_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1515,8 +1515,16 @@ async def bot_command_users(self, update: Update, context: ContextTypes.DEFAULT_
admins_num=users_admin_counter,
)

# Send as markdown
await bot_sender.send_reply(self.config.get("telegram").get("api_key"), user_id, message, markdown=True)
# Send message with auto-splitting
request_response = request_response_container.RequestResponseContainer(
user_id=user_id,
reply_message_id=update.effective_message.id,
module_name="",
response_text=message,
)
await bot_sender.send_message_async(
self.config.get("telegram"), self.messages, request_response, end=True, plain_text=True
)

async def bot_command_chatid(self, update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
"""/chatid command callback
Expand Down

0 comments on commit 8e5f6a2

Please sign in to comment.