I wrote a program that automatically sends messages in a telegram group. I use the following code:
import telebot
chat_id = '-123'
API_KEY = '12345'
bot = telebot.TeleBot(API_KEY)
text = 'Hello world!'
bot.send_message(chat_id, text=text)
exit()
And it works perfectly. However, whenever I run the exact same code on my old laptop, it does not work. Does anyone knows what I am doing wrong?
I used the command ‘pip install telebot’ on both laptops.
3
Answers
On my old laptop I had the newest version (4.0.0), that one did not work.
fixed it for me.
I can see two possible issues:
your bot is not being triggered by anything. (command, regex etc)
Do