irazasyed / telegram-bot-sdk

🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.
https://telegram-bot-sdk.com
BSD 3-Clause "New" or "Revised" License
3.05k stars 673 forks source link

What about mentions? #330

Closed francescomalatesta closed 7 years ago

francescomalatesta commented 7 years ago

Hey there @irazasyed , doing my first steps implementing a bot with Laravel 5.4. Everything works fine btw :)

Just a question about mentions. I've created a couple of commands, extending the Telegram\Bot\Commands\Command class. Everything works fine in private chat, then I added my bot to a group.

Tried to call the command via @botname /command arguments but the command is not called in any way.

Are these command classes "included" also when mentioning the bot? :) It could be a really nice feature. If not possible right now, I could help with a PR for it. :)

Let me know!

irazasyed commented 7 years ago

Hey @francescomalatesta

As far as I know, You can call a command by doing /command@botname arguments in groups. The SDK supports such calls and will process the command like it does in private.

Please test and let me know if that works!

francescomalatesta commented 7 years ago

As not said, it works perfectly, also without any mention. /command arguments is enough! Definitely my bad, closing it!

irazasyed commented 7 years ago

No problem :)

Thanks for confirming it works! 👍