Open kiwina opened 6 years ago
namespace should be Longman\TelegramBot\ UserCommands || Commands || AdminCommands, because namespace for commands static https://github.com/php-telegram-bot/core/blob/master/src/Telegram.php#L265
If you want your custom namespace, you need to add to the constructor Telegram and then use your namespace
//Add default custom commands path
$this->addCommandsPath(BASE_COMMANDS_PATH . '/CustomCommands');
And in method getCommandObject added your commands name For example
$which[] = 'YourClass';
This is being worked on in #689
Not sure if i'm missing something but if i give any command path of custom commands they dont get loaded because this function assumes that the namespace is below Longman\TelegramBot\Commands