Closed iyamk closed 8 months ago
Does the bot shows "has access to messages" on the members list? Sometimes when you toggle the group privacy settings in BotFather you gotta readd the bot.
First as jacklul said, please check if the privacy settings from the bot is turned off. otherwise telegram will not send any non-command messages to the bot
second: you can't use two GenericmessageCommand.php in your Command Folder , regardless of the subfolder. if you need the function of Commands/Group/GenericmessageCommand.php and Commands/Message/GenericmessageCommand.php please merge them to one file.
https://github.com/php-telegram-bot/example-bot/blob/master/config.example.php#L46-L47 https://github.com/php-telegram-bot/example-bot/blob/master/Commands/README.MD https://github.com/php-telegram-bot/example-bot/blob/master/CustomCommands/README.md
Yes, I forgot about the privacy settings and that's why it didn't work.
First as jacklul said, please check if the privacy settings from the bot is turned off. otherwise telegram will not send any non-command messages to the bot
second: you can't use two GenericmessageCommand.php in your Command Folder , regardless of the subfolder. if you need the function of Commands/Group/GenericmessageCommand.php and Commands/Message/GenericmessageCommand.php please merge them to one file.
https://github.com/php-telegram-bot/example-bot/blob/master/config.example.php#L46-L47 https://github.com/php-telegram-bot/example-bot/blob/master/Commands/README.MD https://github.com/php-telegram-bot/example-bot/blob/master/CustomCommands/README.md
Yes, they really conflict and everything worked on one file with a check that the chat_id is the id of the group
🐞 Bug Report
Required Information
{...}
Summary
I need to process group messages but it doesn't work
Current behaviour
Messages in the group are not processed, but messages from the bot are processed
How to reproduce
Need files Commands/Group/GenericmessageCommand.php and Commands/Message/GenericmessageCommand.php Now send a message to the bot and it will process Commands/Group/GenericmessageCommand.php and if the bot is in a group it will not respond to messages at all
Expected behaviour
Since it shouldn't be now, this is a serious bug and it has interrupted my development now