Show / Hide Table of Contents

Class GuildUserProperties

Properties that are used to modify an IGuildUser with the following parameters.

Inheritance
System.Object
GuildUserProperties
Inherited Members
System.Object.ToString()
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
Assembly: Discord.Net.Core.dll
Syntax
public class GuildUserProperties

Properties

| Improve this Doc View Source

Channel

Moves a user to a voice channel. If null, this user will be disconnected from their current voice channel.

Declaration
public Optional<IVoiceChannel> Channel { get; set; }
Property Value
Type Description
Optional<IVoiceChannel>
Remarks

This user MUST already be in a IVoiceChannel for this to work. When set, this property takes precedence over ChannelId.

| Improve this Doc View Source

ChannelId

Moves a user to a voice channel. Set Channel to null to disconnect this user from their current voice channel.

Declaration
public Optional<ulong> ChannelId { get; set; }
Property Value
Type Description
Optional<System.UInt64>
Remarks

This user MUST already be in a IVoiceChannel for this to work.

| Improve this Doc View Source

Deaf

Gets or sets whether the user should be deafened in a voice channel.

Declaration
public Optional<bool> Deaf { get; set; }
Property Value
Type Description
Optional<System.Boolean>
Remarks

If this value is set to true, this user will not be able to hear anyone speak in the guild.

| Improve this Doc View Source

Mute

Gets or sets whether the user should be muted in a voice channel.

Declaration
public Optional<bool> Mute { get; set; }
Property Value
Type Description
Optional<System.Boolean>
Remarks

If this value is set to true, no user will be able to hear this user speak in the guild.

| Improve this Doc View Source

Nickname

Gets or sets the user's nickname.

Declaration
public Optional<string> Nickname { get; set; }
Property Value
Type Description
Optional<System.String>
Remarks

To clear the user's nickname, this value can be set to null or System.String.Empty.

| Improve this Doc View Source

RoleIds

Gets or sets the roles the user should have.

Declaration
public Optional<IEnumerable<ulong>> RoleIds { get; set; }
Property Value
Type Description
Optional<System.Collections.Generic.IEnumerable<System.UInt64>>
Remarks

To add a role to a user: AddRolesAsync(IEnumerable<IRole>, RequestOptions)

To remove a role from a user: RemoveRolesAsync(IEnumerable<IRole>, RequestOptions)

| Improve this Doc View Source

Roles

Gets or sets the roles the user should have.

Declaration
public Optional<IEnumerable<IRole>> Roles { get; set; }
Property Value
Type Description
Optional<System.Collections.Generic.IEnumerable<IRole>>
Remarks

To add a role to a user: AddRolesAsync(IEnumerable<IRole>, RequestOptions)

To remove a role from a user: RemoveRolesAsync(IEnumerable<IRole>, RequestOptions)

See Also

ModifyAsync(System.Action<GuildUserProperties>, RequestOptions)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX