I am trying to write a bot that handles messages using regex, this is my code
import telebot
API_KEY = "[my_key]"
bot = telebot.TeleBot(API_KEY)
@bot.message_handler(regexp="fizz")
def msg_func(message):
bot.reply_to(message,"buzz")
bot.polling()
When I chat privately with the bot i get the correct response
> my name is fizz
Bot:> buzz
But when I add the bot to a telegram group, the bot only handles the command
Me: > my name is fizz
Bot: > [no response]
Me: /fizz
Bot: > buzz
Does somebody know why it behaves like this and how can I fix it?