Show / Hide Table of Contents

# Class RestGuildUser

Represents a REST-based guild user.

##### Inheritance

System.Object
RestEntity<System.UInt64>
RestUser
RestGuildUser

##### Implements

IUpdateable
IGuildUser
IUser
ISnowflakeEntity
IEntity<System.UInt64>
IMentionable
IPresence
IVoiceState

##### Inherited Members

RestUser.IsBot
RestUser.Username
RestUser.DiscriminatorValue
RestUser.AvatarId
RestUser.CreatedAt
RestUser.Discriminator
RestUser.Mention
RestUser.Activity
RestUser.Status
RestUser.ActiveClients
RestUser.IsWebhook
RestUser.GetOrCreateDMChannelAsync(RequestOptions)
RestUser.GetAvatarUrl(ImageFormat, UInt16)
RestUser.GetDefaultAvatarUrl()
RestUser.ToString()
RestUser.IUser.GetOrCreateDMChannelAsync(RequestOptions)
RestEntity<UInt64>.Id
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()

###### Namespace: Discord.Rest

###### Assembly: Discord.Net.Rest.dll

##### Syntax

    public class RestGuildUser : RestUser, IUpdateable, IGuildUser, IUser, ISnowflakeEntity, IEntity<ulong>, IMentionable, IPresence, IVoiceState

### Properties

| Improve this Doc View Source

#### GuildId

##### Declaration

    public ulong GuildId { get; }

##### Property Value

Type | Description
--- | ---
System.UInt64 |

| Improve this Doc View Source

#### GuildPermissions

##### Declaration

    public GuildPermissions GuildPermissions { get; }

##### Property Value

Type | Description
--- | ---
GuildPermissions |

##### Exceptions

Type | Condition
--- | ---
System.InvalidOperationException | Resolving permissions requires the parent guild to be downloaded.

| Improve this Doc View Source

#### IsDeafened

##### Declaration

    public bool IsDeafened { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### IsMuted

##### Declaration

    public bool IsMuted { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### JoinedAt

##### Declaration

    public DateTimeOffset? JoinedAt { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.DateTimeOffset> |

| Improve this Doc View Source

#### Nickname

##### Declaration

    public string Nickname { get; }

##### Property Value

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### PremiumSince

##### Declaration

    public DateTimeOffset? PremiumSince { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.DateTimeOffset> |

| Improve this Doc View Source

#### RoleIds

##### Declaration

    public IReadOnlyCollection<ulong> RoleIds { get; }

##### Property Value

Type | Description
--- | ---
System.Collections.Generic.IReadOnlyCollection<System.UInt64> |

### Methods

| Improve this Doc View Source

#### AddRoleAsync(IRole, RequestOptions)

##### Declaration

    public Task AddRoleAsync(IRole role, RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
IRole | role |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

| Improve this Doc View Source

#### AddRolesAsync(IEnumerable<IRole>, RequestOptions)

##### Declaration

    public Task AddRolesAsync(IEnumerable<IRole> roles, RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Collections.Generic.IEnumerable<IRole> | roles |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

| Improve this Doc View Source

#### GetPermissions(IGuildChannel)

##### Declaration

    public ChannelPermissions GetPermissions(IGuildChannel channel)

##### Parameters

Type | Name | Description
--- | --- | ---
IGuildChannel | channel |

##### Returns

Type | Description
--- | ---
ChannelPermissions |

##### Exceptions

Type | Condition
--- | ---
System.InvalidOperationException | Resolving permissions requires the parent guild to be downloaded.

| Improve this Doc View Source

#### KickAsync(String, RequestOptions)

##### Declaration

    public Task KickAsync(string reason = null, RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | reason |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

| Improve this Doc View Source

#### ModifyAsync(Action<GuildUserProperties>, RequestOptions)

##### Declaration

    public Task ModifyAsync(Action<GuildUserProperties> func, RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Action<GuildUserProperties> | func |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

| Improve this Doc View Source

#### RemoveRoleAsync(IRole, RequestOptions)

##### Declaration

    public Task RemoveRoleAsync(IRole role, RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
IRole | role |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

| Improve this Doc View Source

#### RemoveRolesAsync(IEnumerable<IRole>, RequestOptions)

##### Declaration

    public Task RemoveRolesAsync(IEnumerable<IRole> roles, RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Collections.Generic.IEnumerable<IRole> | roles |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

| Improve this Doc View Source

#### UpdateAsync(RequestOptions)

##### Declaration

    public override Task UpdateAsync(RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

##### Overrides

RestUser.UpdateAsync(RequestOptions)

### Explicit Interface Implementations

| Improve this Doc View Source

#### IGuildUser.Guild

##### Declaration

    IGuild IGuildUser.Guild { get; }

##### Returns

Type | Description
--- | ---
IGuild |

| Improve this Doc View Source

#### IVoiceState.IsSelfDeafened

##### Declaration

    bool IVoiceState.IsSelfDeafened { get; }

##### Returns

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### IVoiceState.IsSelfMuted

##### Declaration

    bool IVoiceState.IsSelfMuted { get; }

##### Returns

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### IVoiceState.IsStreaming

##### Declaration

    bool IVoiceState.IsStreaming { get; }

##### Returns

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### IVoiceState.IsSuppressed

##### Declaration

    bool IVoiceState.IsSuppressed { get; }

##### Returns

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### IVoiceState.VoiceChannel

##### Declaration

    IVoiceChannel IVoiceState.VoiceChannel { get; }

##### Returns

Type | Description
--- | ---
IVoiceChannel |

| Improve this Doc View Source

#### IVoiceState.VoiceSessionId

##### Declaration

    string IVoiceState.VoiceSessionId { get; }

##### Returns

Type | Description
--- | ---
System.String |

### Implements

IUpdateable
IGuildUser
IUser
ISnowflakeEntity
IEntity<TId>
IMentionable
IPresence
IVoiceState