Closed adamramadhan closed 8 years ago
Here you can simply implement what you are looking for. All messages as photo, text, stickers.. are handled by this. This command don't handle: text starting with '/' like /commands.
For redirecting everthing you should code deep in the library
i see, can we overwrite them? we already made it work by making a folder, just in case i dont want to mess anything in my vendors
folder (as im using laravel)
$telegram->addCommandsPath(__DIR__ .'/Telegram');
then
made a file example/forcereply, works great!,
GenericmessageCommand.php
in /Telegram
folder to overwrite the default command?$telegram->setLogRequests(true);
and it works, but it doest show why my new custom command doesn't work, maybe theres an error in line x, how do you currently do the debugging?//$telegram->setCommandConfig('NewchatparticipantCommand', ['active' => 'false
]` or maybe easier to overwrite them and edit to disable them?btw thanks @Mboretto for this awesome work.
Yes sure, overwriting the Generic message commands you will also remove the conversation feature. If you are interested in you should re-implement this logic in your extended command.
I would suggest you to use getUpdatescli to develop and then move to webhooks when everythings work.
We've plan to develop the enable/disable command feature https://github.com/akalongman/php-telegram-bot/issues/93. If you don't want touch your vendor you can overwrite all the commands using EmptyServerResponse function: https://github.com/akalongman/php-telegram-bot/blob/master/src/Commands/SystemCommand.php#L31
;) Thanks!
hello, ive setup an hook, but there is no docs available for doing something like this maybe?
or something like
from node-telegram-api ?
i need to get all the text from at my chat group or private chat that to the bot or bot knows. (yes i already set the permission)