Closed paranoiasystem closed 9 years ago
What is the name of the file? It have to be NicoCommand.php On 17 Jul 2015 18:40, "Marco Ferraioli" notifications@github.com wrote:
I have wrote a new command based on help command
<?phpnamespace Longman\TelegramBot\Commands;use Longman\TelegramBot\Request;use Longman\TelegramBot\Command;use Longman\TelegramBot\Entities\Update;class NicoCommand extends Command{ public function execute() { $update = $this->getUpdate(); $message = $this->getMessage(); $chat_id = $message->getChat()->getId(); $text = $message->getText(true); $data = array(); $data['chat_id'] = $chat_id; $data['text'] = "Sorry, ........"; $result = Request::sendMessage($data); }}
But when I write /nico it not work [image: :cry:]
What's wrong ?
(Sorry for my bad english [image: :grin:] )
— Reply to this email directly or view it on GitHub https://github.com/akalongman/php-telegram-bot/issues/11.
yes, the name is NicoCommand.php
ops I don't want close this :confused:
Wich version of the bot you're using? this is not the last one 0.0.8 right?
I have update the bot, but now when I set webhook I recive this error:
Webhook was not set! Error:
help me :cry:
Try to do he request manually with this: https://api.telegram.org/bot{yourbottoken}/setWebhook?url={yourhttpsurl}
it work. Thanks
I have wrote a new command based on help command
But when I write /nico it not work :cry:
What's wrong ?
(Sorry for my bad english :grin: )