fix: Use Markdown for Telegram messages
This commit is contained in:
@@ -255,7 +255,7 @@ async def send_telegram_message(chat_id: str, text: str, markdown: bool = False)
|
|||||||
return
|
return
|
||||||
payload = {"chat_id": chat_id, "text": text}
|
payload = {"chat_id": chat_id, "text": text}
|
||||||
if markdown:
|
if markdown:
|
||||||
payload["parse_mode"] = "MarkdownV2"
|
payload["parse_mode"] = "Markdown"
|
||||||
async with httpx.AsyncClient() as client:
|
async with httpx.AsyncClient() as client:
|
||||||
try:
|
try:
|
||||||
await client.post(f"{TELEGRAM_API_URL}/sendMessage", json=payload)
|
await client.post(f"{TELEGRAM_API_URL}/sendMessage", json=payload)
|
||||||
|
|||||||
Reference in New Issue
Block a user