Telegram bot sends message correctly, but then sends an error: "Something Went Wrong, Please Try Again."

Asked

Viewed 52 times

0

Please help me, suddenly my Telegram bot on Heroku is sending the correct message and below an error!

Output Result on Telegram channel:

aaaaaa 
Something went wrong, please try again.

The tickle:

import telegram

TOKEN = "xxxxxxxxxxxxxY"
    bot = telegram.Bot(TOKEN)
    print("Bot do telegram conectado!")
    chat_id = "@Noticias"
         
    texto = 'aaaaaa' 
    bot.send_message(chat_id, texto, parse_mode='markdown', disable_web_page_preview=True)

I don’t know what else to do...I tried everything but the mistake doesn’t come out.

  • What is this lib you’re wearing?

  • I am beginner was using python-Telegram-bot==11.1.0, and it worked until then, but is with this error now. Which one do you recommend to use? maybe I should change then

  • Instead of the hardcoded value 'markdown' try using the lib constant telegram.constants.PARSEMODE_MARKDOWN_V2 in the parameter parse_mode

  • tried Markdownv2, same error =/

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.