Handle Conversation parameters #233
Unanswered
DanielSpravtsev
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Fast solution: just override the class AddConversation extends Conversation
{
protected ?string $step = 'first';
public function first(Nutgram $bot, ...$parameters)
{
$bot->sendMessage($parameters['name'] .' | '.$parameters['address']);
$this->end();
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
class AddConversation extends Conversation
{
protected ?string $step = 'first';
public function first(Nutgram $bot, string $name, string $address)
{
$bot->sendMessage("$name | $address");
$this->end();
}
} + strict |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there!
In reference to:
nutgram/src/Conversations/Conversation.php
Line 111 in e21a892
When you using onCommand handler with Conversation class, you could also pass variables and handle it at first step method (by default it's
start
)Conversation
Hope someone wondered about this like me and now able to found a fast solution 😄
Beta Was this translation helpful? Give feedback.
All reactions