I need to send message but without any polling. My bot don't have to reply to any message It just needs to send.
import telebot
bot = telebot.TeleBot("TOKEN")
@bot.message_handler(commands=['start'])
def send_message(message, text):
bot.send_message(message.from_user.id, text)
text = "Text that I want to be sent"
send_message(text)
bot.polling()
print("Message has been sent")
Here is two problems:
- I can't call a function send_message and pass an argument "text" in it
- After sending a message I want my program to work further, and not check the chat for messages