protected function cacheCommandMessage($message, $oldMessage, $cmdContext, $responses) {
        $duration = (int) $this->client->getOption('commandEditableDuration', 0);
        
        if($duration <= 0 || $cmdContext === null) {
            return;
        }
        
        if($responses !== null) {
            $this->results->set($message->id, $cmdContext);
            if($oldMessage === null) {
                $this->client->addTimer($duration, function () use ($message) {
                    $this->results->delete($message->id);
                });
            }
        } else {
            $this->results->delete($message->id);
        }
    }
protected function cacheCommandMessage($message, $oldMessage, $cmdContext, $responses) {
        $duration = (int) $this->client->getOption('commandEditableDuration', 0);
        
        if($duration <= 0 || $cmdContext === null) {
            return;
        }
        
        if($responses !== null) {
            $this->results->set($message->id, $cmdContext);
            if($oldMessage === null) {
                $this->client->addTimer($duration, function () use ($message) {
                    $this->results->delete($message->id);
                });
            }
        } else {
            $this->results->delete($message->id);
        }
    }
protected function cacheCommandMessage ( $ message , $ oldMessage , $ cmdContext , $ responses ) { $ duration = ( int ) $ this -> client -> getOption ( 'commandEditableDuration' , 0 ) ; if ( $ duration <= 0 || $ cmdContext === null ) { return ; } if ( $ responses !== null ) { $ this -> results -> set ( $ message -> id , $ cmdContext ) ; if ( $ oldMessage === null ) { $ this -> client -> addTimer ( $ duration , function ( ) use ( $ message ) { $ this -> results -> delete ( $ message -> id ) ; } ) ; } } else { $ this -> results -> delete ( $ message -> id ) ; } }
Caches a command message to be editable.
@param \CharlotteDunois\Yasmin\Models\Message         $message     Triggering message.
@param \CharlotteDunois\Yasmin\Models\Message|null    $oldMessage  Triggering message's old version.
@param \CharlotteDunois\Livia\Commands\Context|null   $cmdContext  Command context to cache.
@param \CharlotteDunois\Yasmin\Models\Message[]|null  $responses   Responses to the message.
@return void
Caches a command message to be editable .