我尝试2个不同的代码,但是idk为什么那个机器人仍然可以用/首先回复,我只需要机器人回复当我说哇,机器人说哇,当我说/哇那个机器人没有回复,但在这个追逐这个机器人 仍然可以回复/
import telebot
import telegram
import time
from telegram.ext import Updater, CommandHandler
bot = telebot.TeleBot("TOKEN")
#ex1:wow
@bot.message_handler(func=lambda msg:['wow'])
def at_answer(message):
bot.reply_to(message, 'wow!')
#ex2:halo
def halo(bot, update):
update.message.reply_text('Haloe!')
updater.dispatcher.add_handler(MessageHandler(Filters.regex('halo'), halo))
bot.polling()
https://stackoverflow.com/questions/-100005821
复制相似问题