Skip to content

Commit 1b34946

Browse files
committed
fix
1 parent 15091ab commit 1b34946

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/testing/examples.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ $bot->onCommand('remove_keyboard', function (Nutgram $bot) {
9494
<TabItem value="test" label="Test">
9595

9696
```php title="unable to get stats"
97-
$bot->onText('stats', function (Nutgram $bot) {
97+
$bot->onCommand('stats', function (Nutgram $bot) {
9898
$bot->sendMessage('Sensitive data');
9999
})->middleware(OnlyDev::class);
100100

@@ -104,7 +104,7 @@ $bot->hearText('/stats')
104104
```
105105

106106
```php title="able to get stats"
107-
$bot->onText('stats', function (Nutgram $bot) {
107+
$bot->onCommand('stats', function (Nutgram $bot) {
108108
$bot->sendMessage('Sensitive data');
109109
})->middleware(OnlyDev::class);
110110

@@ -184,7 +184,11 @@ $bot->hearCallbackQueryData('feedback.cancel')
184184
</TabItem>
185185
<TabItem value="handler" label="Conversation">
186186

187-
```php
187+
```php title="Bot.php"
188+
$bot->onCommand('feedback', FeedbackConversation::class);
189+
```
190+
191+
```php title="FeedbackConversation.php"
188192
class FeedbackConversation extends Conversation
189193
{
190194
public function start(Nutgram $bot): void

0 commit comments

Comments
 (0)