mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
use query.edit_message_text to simplify telegram class
This commit is contained in:
parent
8ca905b45f
commit
fd737af69d
|
@ -1777,13 +1777,9 @@ class Telegram(RPCHandler):
|
||||||
msg += f"\nUpdated: {datetime.now().ctime()}"
|
msg += f"\nUpdated: {datetime.now().ctime()}"
|
||||||
if not query.message:
|
if not query.message:
|
||||||
return
|
return
|
||||||
chat_id = query.message.chat_id
|
|
||||||
message_id = query.message.message_id
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await self._app.bot.edit_message_text(
|
await query.edit_message_text(
|
||||||
chat_id=chat_id,
|
|
||||||
message_id=message_id,
|
|
||||||
text=msg,
|
text=msg,
|
||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
reply_markup=reply_markup
|
reply_markup=reply_markup
|
||||||
|
|
Loading…
Reference in New Issue
Block a user