fix: use ellipsis character instead of dots in status messages for MarkdownV2 compatibility
This commit is contained in:
@@ -57,7 +57,7 @@ def send_text(tg_cfg: TelegramConfig, chat_id: str, text: str,
|
||||
return result["result"]["message_id"]
|
||||
|
||||
|
||||
def send_thinking(tg_cfg: TelegramConfig, chat_id: str, text: str = "💭 思考中...") -> int:
|
||||
def send_thinking(tg_cfg: TelegramConfig, chat_id: str, text: str = "💭 思考中…") -> int:
|
||||
result = _tg_req(tg_cfg, "sendMessage", {
|
||||
"chat_id": chat_id,
|
||||
"text": text,
|
||||
@@ -66,13 +66,11 @@ def send_thinking(tg_cfg: TelegramConfig, chat_id: str, text: str = "💭 思考
|
||||
|
||||
|
||||
def edit_message(tg_cfg: TelegramConfig, chat_id: str, msg_id: int,
|
||||
text: str, reply_markup: dict = None, parse_mode: str = "MarkdownV2"):
|
||||
text: str, reply_markup: dict = None):
|
||||
payload = {
|
||||
"chat_id": chat_id, "message_id": msg_id,
|
||||
"text": text,
|
||||
"text": text, "parse_mode": "MarkdownV2",
|
||||
}
|
||||
if parse_mode:
|
||||
payload["parse_mode"] = parse_mode
|
||||
if reply_markup:
|
||||
payload["reply_markup"] = reply_markup
|
||||
_tg_req(tg_cfg, "editMessageText", payload)
|
||||
|
||||
Reference in New Issue
Block a user