Skip to content

Commit

Permalink
Merge pull request #357 from moayedlaravel/patch-1
Browse files Browse the repository at this point in the history
Chat Commands Start With Slash (/)
  • Loading branch information
fabio-ivona authored Mar 12, 2023
2 parents dc066e4 + 00d6995 commit 90c1c3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/content/en/webhooks/webhook-request-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ class CustomWebhookHandler extends WebhookHandler

## Chat Commands

Telegraph bots can receive commands from chats where they are registered. A command is a telegram message has a _backslash_ (`\`) char followed by a descriptive word:
Telegraph bots can receive commands from chats where they are registered. A command is a telegram message has a _slash_ (`/`) char followed by a descriptive word:

```
\hi Fabio
/hi Fabio
```

what the command will trigger is up to the developer, but a webhook will react to it if it has a public method named as the command:
Expand Down Expand Up @@ -88,7 +88,7 @@ class CustomWebhookHandler extends WebhookHandler
{
public function hi()
{
$text = $this->message->text(); //\hi Fabio
$text = $this->message->text(); // /hi Fabio
}
}
```
Expand Down

0 comments on commit 90c1c3a

Please sign in to comment.