From 665797ac220fb86f6621d1d013eb4c0c9075927e Mon Sep 17 00:00:00 2001 From: moayed <118882102+moayedlaravel@users.noreply.github.com> Date: Sat, 11 Mar 2023 17:13:58 +0300 Subject: [PATCH 1/2] Chat Commands Start With Slash (/) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chat Commands Start With Slash (/) Not BackSlash (\) [ /hi Fabio ] ✔️ [ \hi Fabio ] ❌ --- docs/content/en/webhooks/webhook-request-types.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/en/webhooks/webhook-request-types.md b/docs/content/en/webhooks/webhook-request-types.md index fa9793b48..2f98c7bb9 100644 --- a/docs/content/en/webhooks/webhook-request-types.md +++ b/docs/content/en/webhooks/webhook-request-types.md @@ -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: @@ -88,7 +88,7 @@ class CustomWebhookHandler extends WebhookHandler { public function hi() { - $text = $this->message->text(); //\hi Fabio + $text = $this->message->text(); // [/hi Fabio] } } ``` From 00d6995eed92de3eab8ee29e5dc022f385b4f94e Mon Sep 17 00:00:00 2001 From: Fabio Ivona Date: Sun, 12 Mar 2023 10:23:01 +0100 Subject: [PATCH 2/2] Update docs/content/en/webhooks/webhook-request-types.md Co-authored-by: Faissal Wahabali --- docs/content/en/webhooks/webhook-request-types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/en/webhooks/webhook-request-types.md b/docs/content/en/webhooks/webhook-request-types.md index 2f98c7bb9..fbf05f53b 100644 --- a/docs/content/en/webhooks/webhook-request-types.md +++ b/docs/content/en/webhooks/webhook-request-types.md @@ -88,7 +88,7 @@ class CustomWebhookHandler extends WebhookHandler { public function hi() { - $text = $this->message->text(); // [/hi Fabio] + $text = $this->message->text(); // /hi Fabio } } ```