If you already using Laravel you might be familiar with the artisan make commands.
OpenOverlay uses the same command and structure to create a base Command.
You can simply create a command with our make command, that based on Laravel make commands.
This command will create a new Class in the App\Bot\Commands
namespace with the \Redbeed\OpenOverlay\ChatBot\Commands\BotCommand
as a parent.
sail artisan make:bot-command HelloWorldCommand
HelloWorld can be replaced by your wanted Class name
You need the Command to your config/openoverlay.php
config file to enable it.
return [
'bot' => [
'commands' => [
'advanced' => [
...
App\Bot\Commands\HelloWorldCommand::class,
]
After you added or changed your Bot Command you always have to restart the Bot Container.
sail restart laravel.chatbot