File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ $bot->onCommand('remove_keyboard', function (Nutgram $bot) {
94
94
<TabItem value = " test" label = " Test" >
95
95
96
96
``` php title="unable to get stats"
97
- $bot->onText ('stats', function (Nutgram $bot) {
97
+ $bot->onCommand ('stats', function (Nutgram $bot) {
98
98
$bot->sendMessage('Sensitive data');
99
99
})->middleware(OnlyDev::class);
100
100
@@ -104,7 +104,7 @@ $bot->hearText('/stats')
104
104
```
105
105
106
106
``` php title="able to get stats"
107
- $bot->onText ('stats', function (Nutgram $bot) {
107
+ $bot->onCommand ('stats', function (Nutgram $bot) {
108
108
$bot->sendMessage('Sensitive data');
109
109
})->middleware(OnlyDev::class);
110
110
@@ -184,7 +184,11 @@ $bot->hearCallbackQueryData('feedback.cancel')
184
184
</TabItem >
185
185
<TabItem value = " handler" label = " Conversation" >
186
186
187
- ``` php
187
+ ``` php title="Bot.php"
188
+ $bot->onCommand('feedback', FeedbackConversation::class);
189
+ ```
190
+
191
+ ``` php title="FeedbackConversation.php"
188
192
class FeedbackConversation extends Conversation
189
193
{
190
194
public function start(Nutgram $bot): void
You can’t perform that action at this time.
0 commit comments