PhpSlackBot\Command\PokerPlanningCommand::execute PHP Method

execute() protected method

protected execute ( $message, $context )
    protected function execute($message, $context)
    {
        $args = $this->getArgs($message);
        $command = isset($args[1]) ? $args[1] : '';
        switch ($command) {
            case 'start':
                $this->start($args);
                break;
            case 'status':
                $this->status();
                break;
            case 'vote':
                $this->vote($args);
                break;
            case 'end':
                $this->end();
                break;
            default:
                $this->send($this->getCurrentChannel(), $this->getCurrentUser(), 'No comprendo. Use "' . $this->getName() . ' start" or "' . $this->getName() . ' status"');
        }
    }