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');
    }
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');
    }
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' ) ; }
Resolves a given commandgroup, command group name or command message to the command group.
@param string|\CharlotteDunois\Livia\Commands\CommandGroup|\CharlotteDunois\Livia\Commands\Context  $resolvable
@return \CharlotteDunois\Livia\Commands\CommandGroup
@throws \RuntimeException
Resolves a given commandgroup command group name or command message to the command group .