-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
Please answer these questions before submitting your issue. Thanks!
-
What version of pyTelegramBotAPI are you using? - 4.14.1
-
What OS are you using? - Ubuntu
-
What version of python are you using? - Above Python3
import telebot
import schedule
import time
# Replace 'YOUR_BOT_TOKEN' with your actual Telegram Bot token
bot_token = 'token'
chat_id = 'Chat_id'
bot = telebot.TeleBot(bot_token)
def send_scheduled_message():
message_text = "This is a scheduled message!"
bot.send_poll(
chat_id,
question="Which of the following command is used to add a new user to the system?",
options=['Linux', 'adduser', 'useradd', 'All of above'],
is_anonymous=False,correct_option_id=2,)
# Schedule the message to be sent every day at a specific time (adjust the time as needed)
schedule.every(3).seconds.do(send_scheduled_message)
# Run the scheduler in the background
while True:
schedule.run_pending()
time.sleep(1)
When ever the bot send the quiz the correct option is not working it accpection all answers showing correct
Metadata
Metadata
Assignees
Labels
No labels