skip to Main Content

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?

2

Answers


  1. I’ve had the same issue. Then I revoked my bot token through BotFather and so far it’s been back to normal.

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search