Replies: 4 comments 1 reply
-
Hi, could you paste here the error stacktrace? |
Beta Was this translation helpful? Give feedback.
-
Of course: Error stacktrace
In general, this is not important, the situation itself is wrong. |
Beta Was this translation helpful? Give feedback.
-
On the contrary, the stack trace allows me to identify the issue I've released a fix for this (please upgrade to ^v1.33.1)
you are referring to the documentation for callback queries, but your message says you want to handle a command instead. Your code works anyway, but you should not refer to that part of the documentation
if you want to handle an invalid action you can use this: class MyWebhookHandler extends WebhookHandler
{
public function test(): void
{
MyClass::myMethod();
}
protected function handleUnknownCommand(Stringable $text): void
{
$this->reply('Invalid action');
}
} |
Beta Was this translation helpful? Give feedback.
-
I mean that the test() method will be called in two cases:
It seems to me that this is wrong. Sorry for my English, I'm using a translator. |
Beta Was this translation helpful? Give feedback.
-
Hi.
The documentation says:
But, for example, I have a method for callback data:
If I type the
/test
command in the chat, it will cause a fatal error. How can this be avoided?Is there another way to handle the callback function? For example:
Beta Was this translation helpful? Give feedback.
All reactions