Slackwolf\Game\Command\SetOptionCommand::fire PHP Method

fire() public method

public fire ( )
    public function fire()
    {
        $client = $this->client;
        $help_msg = "Options\r\n------------------------\r\n";
        $help_msg .= "Usage: !option name value\r\nThe valid names and values are provided below for each option. The current value is indicated in parenthesis.\r\n";
        $help_msg .= "Available Options\r\n------------------------\r\n";
        foreach ($this->gameManager->optionsManager->options as $curOption) {
            /* @var \Slackwolf\Game\Option $curOption */
            $help_msg .= OptionFormatter::format($curOption);
        }
        $this->client->getDMByUserId($this->userId)->then(function (DirectMessageChannel $dm) use($client, $help_msg) {
            $client->send($help_msg, $dm);
        });
    }
SetOptionCommand