Core: WhoisCommand and create /commandID

Created on 14 Sep 2017  路  4Comments  路  Source: php-telegram-bot/core

Hi!
The command /whois doesn't work correctly. If I write /whois150142952 - he doesn't respond. And if I write /whois 150142952 - bot shows me user info.
How can I fix that? I remember earlier this command worked well...
I didn't change anything in code, I think this bug occurred after the update.

And second question.
How can I create custom commands like WhoisCommand?
Ex: /setclose111222 (NOT /setclose 111222) - closes order with ID 111222

Thanks in advance!

Most helpful comment

If you use own version of GenericCommand.php then please look here and copy the code https://github.com/php-telegram-bot/example-bot/blob/master/Commands/GenericCommand.php

Thats also a way to implement own command like this.

All 4 comments

If you use own version of GenericCommand.php then please look here and copy the code https://github.com/php-telegram-bot/example-bot/blob/master/Commands/GenericCommand.php

Thats also a way to implement own command like this.

For the /whois command to work properly, you also need the example GenericCommand.php file.

You'll see there how to handle commands like the one you're trying to make 馃憤

@jacklul @noplanman Thanks!

@jacklul Seriously, you beat me again by a minute?! 馃樄

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NabiKAZ picture NabiKAZ  路  3Comments

abbe-cipher picture abbe-cipher  路  4Comments

Recouse picture Recouse  路  3Comments

marcolino7 picture marcolino7  路  3Comments

sayjeyhi picture sayjeyhi  路  3Comments