1

I have a telegram bot and I'm trying to add little "features" to it that I find useful by adding more CommandHandler. The new features work fine in personal chat but don't work in group chats. I am perplexed by this.

My code is something as follows

def func1(bot, update):
    <somecode>


def func2(bot, update, args):
    <somecode>

def error(bot, update, error):
    <errorhandler>

def newfunc(bot, update, args):
    <newcode>


dispatcher.add_handler(CommandHandler('func1', func1))
dispatcher.add_handler(CommandHandler('func2', func2, pass_args=True))
dispatcher.add_handler(CommandHandler('newfunc', newfunc, pass_args=True))
dispatcher.add_error_handler(error)

The func1 and func2 work fine and they were there before but the new newfunc does not work in group chats.

I have no idea whats causing this

Naman
  • 179
  • 2
  • 13

1 Answers1

0

I figured out the problem.

I had update.message.reply_text as the response text in the newfunc code but the bot was in privacy mode.

The simple solution was to turn privacy mode off so it can access the messages

Naman
  • 179
  • 2
  • 13