| @@ 10-25 (lines=16) @@ | ||
| 7 | use Illuminate\Console\Command; |
|
| 8 | use FondBot\Conversation\ConversationCreator; |
|
| 9 | ||
| 10 | class MakeIntent extends Command |
|
| 11 | { |
|
| 12 | protected $signature = 'make:intent |
|
| 13 | {name : Name of intent}'; |
|
| 14 | ||
| 15 | protected $description = 'Create a new intent class'; |
|
| 16 | ||
| 17 | public function handle(ConversationCreator $creator): void |
|
| 18 | { |
|
| 19 | $name = $this->argument('name'); |
|
| 20 | ||
| 21 | $creator->createIntent('src', 'Bot', $name); |
|
| 22 | ||
| 23 | $this->info('Intent created.'); |
|
| 24 | } |
|
| 25 | } |
|
| 26 | ||
| @@ 10-25 (lines=16) @@ | ||
| 7 | use Illuminate\Console\Command; |
|
| 8 | use FondBot\Conversation\ConversationCreator; |
|
| 9 | ||
| 10 | class MakeInteraction extends Command |
|
| 11 | { |
|
| 12 | protected $signature = 'make:interaction |
|
| 13 | {name : Name of interaction}'; |
|
| 14 | ||
| 15 | protected $description = 'Create a new interaction class'; |
|
| 16 | ||
| 17 | public function handle(ConversationCreator $creator): void |
|
| 18 | { |
|
| 19 | $name = $this->argument('name'); |
|
| 20 | ||
| 21 | $creator->createInteraction('src', 'Bot', $name); |
|
| 22 | ||
| 23 | $this->info('Interaction created.'); |
|
| 24 | } |
|
| 25 | } |
|
| 26 | ||