Replies: 1 comment 1 reply
-
Hi, english only, and wrong library:) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, english only, and wrong library:) |
Beta Was this translation helpful? Give feedback.
-
J'ai réussi à créer le bot mais pour le moment il demande une équation simple et attend une réponse précise mais lorsque je l'ajoute dans mon groupe telegramme il pose la question et lorsqu'on répond il ne passe rien je doit utilisé la commande /start pour qu'il réponde je suis un peut bloqué...
import telebot
from telebot import types
telegram_api_key = 'My key API'
bot = telebot.TeleBot(telegram_api_key)
Handler pour les commandes start et help
@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):
msg = bot.reply_to(message, "Bonjour! Pour vérifier que vous êtes un humain, veuillez répondre à cette question : 3 + 4 = ?")
bot.register_next_step_handler(msg, process_verification_step)
def process_verification_step(message):
try:
chat_id = message.chat.id
answer = message.text.strip()
Lance le bot
bot.infinity_polling()
Beta Was this translation helpful? Give feedback.
All reactions