'Telegram bot sending error "Something went wrong, please try again" after message
Output
aaaaaa
Something went wrong, please try again.
Code:
import telegram
TOKEN = "xxxxxxxxxxxxxY"
bot = telegram.Bot(TOKEN)
print("Bot connected!")
chat_id = "@News"
texto = 'aaaaaa'
bot.send_message(chat_id, texto, parse_mode='markdown', disable_web_page_preview=True)
requirements.txt python-telegram-bot
How can I fix this?
Solution 1:[1]
I guess someone scraped your bot token from a public repository and tried to steal your bot. Please, do not save your bot token in a public repository!
Solution: Revoke your token and don't save it in a public repository.
Solution 2:[2]
I've had the same issue. Then I revoked my bot token through BotFather and so far it's been back to normal.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Peter Mortensen |
Solution 2 | Alberto Robs |