protected function shouldHandleMessage(\CharlotteDunois\Yasmin\Models\Message $message, \CharlotteDunois\Yasmin\Models\Message $oldMessage = null) {
        if($message->author->bot || $message->author->id === $this->client->user->id) {
            return false;
        }
        
        if($message->guild !== null && !$message->guild->available) {
            return false;
        }
        
        // Ignore messages from users that the bot is already waiting for input from
        if(\array_key_exists($message->author->id.'-'.$message->channel->id, $this->awaiting)) {
            return false;
        }
        
        if($oldMessage !== null && $message->content === $oldMessage->content) {
            return false;
        }
        
        $editableDuration = (int) $this->client->getOption('commandEditableDuration');
        if($message->editedTimestamp !== null && ($editableDuration <= 0 || ($message->editedTimestamp - $message->createdTimestamp) >= $editableDuration)) {
            return false;
        }
        
        return true;
    }
protected function shouldHandleMessage(\CharlotteDunois\Yasmin\Models\Message $message, \CharlotteDunois\Yasmin\Models\Message $oldMessage = null) {
        if($message->author->bot || $message->author->id === $this->client->user->id) {
            return false;
        }
        
        if($message->guild !== null && !$message->guild->available) {
            return false;
        }
        
        // Ignore messages from users that the bot is already waiting for input from
        if(\array_key_exists($message->author->id.'-'.$message->channel->id, $this->awaiting)) {
            return false;
        }
        
        if($oldMessage !== null && $message->content === $oldMessage->content) {
            return false;
        }
        
        $editableDuration = (int) $this->client->getOption('commandEditableDuration');
        if($message->editedTimestamp !== null && ($editableDuration <= 0 || ($message->editedTimestamp - $message->createdTimestamp) >= $editableDuration)) {
            return false;
        }
        
        return true;
    }
protected function shouldHandleMessage ( \ CharlotteDunois \ Yasmin \ Models \ Message $ message , \ CharlotteDunois \ Yasmin \ Models \ Message $ oldMessage = null ) { if ( $ message -> author -> bot || $ message -> author -> id === $ this -> client -> user -> id ) { return false ; } if ( $ message -> guild !== null && ! $ message -> guild -> available ) { return false ; } // Ignore messages from users that the bot is already waiting for input from if ( \ array_key_exists ( $ message -> author -> id . '-' . $ message -> channel -> id , $ this -> awaiting ) ) { return false ; } if ( $ oldMessage !== null && $ message -> content === $ oldMessage -> content ) { return false ; } $ editableDuration = ( int ) $ this -> client -> getOption ( 'commandEditableDuration' ) ; if ( $ message -> editedTimestamp !== null && ( $ editableDuration <= 0 || ( $ message -> editedTimestamp - $ message -> createdTimestamp ) >= $ editableDuration ) ) { return false ; } return true ; }
Check whether a message should be handled.
@param \CharlotteDunois\Yasmin\Models\Message       $message
@param \CharlotteDunois\Yasmin\Models\Message|null  $oldMessage
@return bool
Check whether a message should be handled .