use query.edit_message_text to simplify telegram class

This commit is contained in:
Matthias 2024-02-12 06:29:42 +01:00
parent 8ca905b45f
commit fd737af69d

View File

@ -1777,13 +1777,9 @@ class Telegram(RPCHandler):
msg += f"\nUpdated: {datetime.now().ctime()}"
if not query.message:
return
chat_id = query.message.chat_id
message_id = query.message.message_id
try:
await self._app.bot.edit_message_text(
chat_id=chat_id,
message_id=message_id,
await query.edit_message_text(
text=msg,
parse_mode=parse_mode,
reply_markup=reply_markup