Longman\TelegramBot\Conversation::getCommand PHP Method

getCommand() public method

Retrieve the command to execute from the conversation
public getCommand ( ) : string | null
return string | null
    public function getCommand()
    {
        return $this->command;
    }

Usage Example

 public function testNewConversationThatWillExistWithCommand()
 {
     $info = TestHelpers::startFakeConversation();
     $conversation = new Conversation($info['user_id'], $info['chat_id'], 'command');
     $this->assertTrue($conversation->exists());
     $this->assertEquals('command', $conversation->getCommand());
 }
All Usage Examples Of Longman\TelegramBot\Conversation::getCommand