public function command($name, Closure $action)
    {
        return $this->on(self::getEvent($action), self::getChecker($name));
    }
public function command($name, Closure $action)
    {
        return $this->on(self::getEvent($action), self::getChecker($name));
    }
public function command ( $ name , Closure $ action ) { return $ this -> on ( self :: getEvent ( $ action ) , self :: getChecker ( $ name ) ) ; }
Use this method to add command. Parameters will be automatically parsed and passed to closure.

@param string $name
@param \Closure $action

@return \TelegramBot\Api\Client
Use this method to add command . Parameters will be automatically parsed and passed to closure .