function resolve($user) {
        if($user instanceof \CharlotteDunois\Yasmin\Models\User) {
            return $user;
        }
        
        if($user instanceof \CharlotteDunois\Yasmin\Models\GuildMember) {
            return $user->user;
        }
        
        if(\is_int($user)) {
            $user = (string) $user;
        }
        
        if(\is_string($user) && parent::has($user)) {
            return parent::get($user);
        }
        
        throw new \InvalidArgumentException('Unable to resolve unknown user');
    }
function resolve($user) {
        if($user instanceof \CharlotteDunois\Yasmin\Models\User) {
            return $user;
        }
        
        if($user instanceof \CharlotteDunois\Yasmin\Models\GuildMember) {
            return $user->user;
        }
        
        if(\is_int($user)) {
            $user = (string) $user;
        }
        
        if(\is_string($user) && parent::has($user)) {
            return parent::get($user);
        }
        
        throw new \InvalidArgumentException('Unable to resolve unknown user');
    }
function resolve ( $ user ) { if ( $ user instanceof \ CharlotteDunois \ Yasmin \ Models \ User ) { return $ user ; } if ( $ user instanceof \ CharlotteDunois \ Yasmin \ Models \ GuildMember ) { return $ user -> user ; } if ( \ is_int ( $ user ) ) { $ user = ( string ) $ user ; } if ( \ is_string ( $ user ) && parent :: has ( $ user ) ) { return parent :: get ( $ user ) ; } throw new \ InvalidArgumentException ( 'Unable to resolve unknown user' ) ; }
Resolves given data to an user.
@param \CharlotteDunois\Yasmin\Models\User|\CharlotteDunois\Yasmin\Models\GuildMember|string|int  $user  string/int = user ID
@return \CharlotteDunois\Yasmin\Models\User
@throws \InvalidArgumentException
Resolves given data to an user .