protected function respond(string $type, string $content, array $options = array(), bool $fromEdit = false) {
        if($type === 'reply' && $this->message->channel instanceof \CharlotteDunois\Yasmin\Interfaces\DMChannelInterface) {
            $type = 'plain';
        }
        
        if($type !== 'direct' && $this->message->guild !== null && !$this->message->channel->permissionsFor($this->client->user)->has('SEND_MESSAGES')) {
            $type = 'direct';
        }
        
        if(!empty($options['split']) && !\is_array($options['split'])) {
            $options['split'] = array();
        }
        
        $channelID = $this->getChannelIDOrDM($this->message->channel);
        $shouldEdit = (
            !empty($this->responses) &&
            (
                ($type === 'direct' && !empty($this->responses['dm'])) ||
                ($type !== 'direct' && !empty($this->responses[$channelID]))
            ) &&
            !$fromEdit &&
            empty($options['files'])
        );
        
        switch($type) {
            case 'plain':
                if($shouldEdit) {
                    return $this->editCurrentResponse($channelID, $type, $content, $options);
                } else {
                    return $this->message->channel->send($content, $options);
                }
            break;
            case 'reply':
                if($shouldEdit) {
                    return $this->editCurrentResponse($channelID, $type, $content, $options);
                } else {
                    if(!empty($options['split']) && empty($options['split']['prepend'])) {
                        $options['split']['prepend'] = $this->message->author->__toString().\CharlotteDunois\Yasmin\Models\Message::$replySeparator;
                    }
                    
                    return $this->message->reply($content, $options);
                }
            break;
            case 'direct':
                if($shouldEdit) {
                    return $this->editCurrentResponse($channelID, $type, $content, $options);
                } else {
                    return $this->message->author->createDM()->then(function ($channel) use ($content, $options) {
                        return $channel->send($content, $options);
                    });
                }
            break;
            default:
                throw new \RangeException('Unknown response type "'.$type.'"');
            break;
        }
    }