function resolveGroup($resolvable) {
        if($resolvable instanceof \CharlotteDunois\Livia\Commands\CommandGroup) {
            return $resolvable;
        }
        
        if($resolvable instanceof \CharlotteDunois\Livia\Commands\Context) {
            return $resolvable->command->group;
        }
        
        $groups = $this->findGroups($resolvable, true);
        if(\count($groups) === 1) {
            return $groups[0];
        }
        
        throw new \RuntimeException('Unable to resolve command group');
    }