Closed CodingJediKnight closed 5 years ago
https://github.com/php-telegram-bot/core/issues/572#issuecomment-317465569 was very helpfull! Lost a day to figure it out and find answer after 15 minutes after posting this issue)
I find a thing that confuse me the most. For example I'm extending command like that:
<?php
namespace App\Telegram\Commands;
use \Longman\TelegramBot\Commands\AdminCommands\DebugCommand as NativeDebugCommand;
class HelpTestCommand extends NativeDebugCommand {
protected $name = 'helptest';
protected $usage = '/helptest';
public function execute()
{
parent::execute();
}
}
path file: /app/Telegram/Commands/HelpTestCommand.php
It doesn't work until I change namespace to this:
namespace Longman\TelegramBot\Commands\AdminCommands;
@CodingJediKnight Yes, the command namespace is a bit troublesome at the moment. Sorry about that :confused:
Please put this somewhere in the documentation or share if there is a fix. Spent hours trying to figure out what went wrong. (Nice library by the way)
I've get confused when bot was silent on webhook method. DB updates correct. But bot don't answer on any command. So I desided to test on update method and got the same =( DB updating with correct recieving data from telegram, but don't answer. So I add
Request::sendMessage
tohandleGetUpdates()
in my controller to check if there any connect problems with telegram on my side:But bot breakes the silence)
So I thing there is some problems with Command factory, but I can't find where. Can somebody help me with this?