function registerCommandsIn(string $path, $ignoreSameLevelFiles = false) {
        $path = \realpath($path);
        if(!$path) {
            throw new \RuntimeException('Invalid path specified');
        }
        
        $this->addCommandsDirectory($path);
        $files = \CharlotteDunois\Livia\Utils\FileHelpers::recursiveFileSearch($path, '*.php');
        
        foreach($files as $file) {
            if($ignoreSameLevelFiles === true) {
                $filepath = \ltrim(\str_replace(array($path, '\\'), array('', '/'), $file), '/');
                if(\mb_substr_count($filepath, '/') === 0) {
                    continue;
                }
            } elseif(!empty($ignoreSameLevelFiles) && \mb_stripos($file, $ignoreSameLevelFiles) !== false) {
                continue;
            }
            
            $command = include $file;
            
            if(!\is_callable($command)) {
                throw new \RuntimeException('Command file '.\str_replace($path, '', $file).' does not return an anonymous function');
            }
            
            $cmd = $command($this->client);
            if(!($cmd instanceof \CharlotteDunois\Livia\Commands\Command)) {
                throw new \RuntimeException('Anonymous function in command file '.\str_replace($path, '', $file).' does not return an instance of Command');
            }
            
            if($this->commands->has($cmd->name)) {
                throw new \RuntimeException('Can not register another command with the name '.$cmd->name);
            }
            
            $this->commands->set($cmd->name, $cmd);
            
            $group = $this->resolveGroup($cmd->groupID);
            $group->commands->set($cmd->name, $cmd);
            
            $this->client->emit('debug', 'Registered command '.$cmd->groupID.':'.$cmd->name);
            $this->client->emit('commandRegister', $cmd, $this);
        }
        
        return $this;
    }