Search Results for

    Show / Hide Table of Contents

    Class SocketGuildUser

    Represents a WebSocket-based guild user.

    Inheritance
    Object
    SocketEntity<UInt64>
    SocketUser
    SocketGuildUser
    Implements
    IEntity<UInt64>
    IGuildUser
    IUser
    ISnowflakeEntity
    IEntity<UInt64>
    IMentionable
    IPresence
    IVoiceState
    Inherited Members
    SocketUser.PublicFlags
    SocketUser.CreatedAt
    SocketUser.Discriminator
    SocketUser.Mention
    SocketUser.Status
    SocketUser.ActiveClients
    SocketUser.Activities
    SocketUser.MutualGuilds
    SocketUser.CreateDMChannelAsync(RequestOptions)
    SocketUser.GetAvatarUrl(ImageFormat, UInt16)
    SocketUser.GetDefaultAvatarUrl()
    SocketUser.ToString()
    SocketEntity<UInt64>.Id
    Namespace: Discord.WebSocket
    Assembly: Discord.Net.WebSocket.dll
    Syntax
    public class SocketGuildUser : SocketUser, IEntity<ulong>, IGuildUser, IUser, ISnowflakeEntity, IEntity<ulong>, IMentionable, IPresence, IVoiceState

    Properties

    | Improve this Doc View Source

    AudioStream

    Declaration
    public AudioInStream AudioStream { get; }
    Property Value
    Type Description
    AudioInStream
    | Improve this Doc View Source

    AvatarId

    Declaration
    public override string AvatarId { get; }
    Property Value
    Type Description
    String
    Overrides
    SocketUser.AvatarId
    | Improve this Doc View Source

    DiscriminatorValue

    Declaration
    public override ushort DiscriminatorValue { get; }
    Property Value
    Type Description
    UInt16
    Overrides
    SocketUser.DiscriminatorValue
    | Improve this Doc View Source

    DisplayAvatarId

    Declaration
    public string DisplayAvatarId { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    DisplayName

    Declaration
    public string DisplayName { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Guild

    Gets the guild the user is in.

    Declaration
    public SocketGuild Guild { get; }
    Property Value
    Type Description
    SocketGuild
    | Improve this Doc View Source

    GuildAvatarId

    Declaration
    public string GuildAvatarId { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    GuildPermissions

    Gets the guild-level permissions for this user.

    Declaration
    public GuildPermissions GuildPermissions { get; }
    Property Value
    Type Description
    GuildPermissions

    A GuildPermissions structure for this user, representing what permissions this user has in the guild.

    | Improve this Doc View Source

    Hierarchy

    Returns the position of the user within the role hierarchy.

    Declaration
    public int Hierarchy { get; }
    Property Value
    Type Description
    Int32
    Remarks

    The returned value equal to the position of the highest role the user has, or if user is the server owner.

    | Improve this Doc View Source

    IsBot

    Declaration
    public override bool IsBot { get; }
    Property Value
    Type Description
    Boolean
    Overrides
    SocketUser.IsBot
    | Improve this Doc View Source

    IsDeafened

    Declaration
    public bool IsDeafened { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsMuted

    Declaration
    public bool IsMuted { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsPending

    Declaration
    public bool? IsPending { get; }
    Property Value
    Type Description
    Nullable<Boolean>
    | Improve this Doc View Source

    IsSelfDeafened

    Declaration
    public bool IsSelfDeafened { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsSelfMuted

    Declaration
    public bool IsSelfMuted { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsStreaming

    Declaration
    public bool IsStreaming { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsSuppressed

    Declaration
    public bool IsSuppressed { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsVideoing

    Declaration
    public bool IsVideoing { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsWebhook

    Declaration
    public override bool IsWebhook { get; }
    Property Value
    Type Description
    Boolean
    Overrides
    SocketUser.IsWebhook
    | Improve this Doc View Source

    JoinedAt

    Declaration
    public DateTimeOffset? JoinedAt { get; }
    Property Value
    Type Description
    Nullable<DateTimeOffset>
    | Improve this Doc View Source

    Nickname

    Declaration
    public string Nickname { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    PremiumSince

    Declaration
    public DateTimeOffset? PremiumSince { get; }
    Property Value
    Type Description
    Nullable<DateTimeOffset>
    | Improve this Doc View Source

    RequestToSpeakTimestamp

    Declaration
    public DateTimeOffset? RequestToSpeakTimestamp { get; }
    Property Value
    Type Description
    Nullable<DateTimeOffset>
    | Improve this Doc View Source

    Roles

    Returns a collection of roles that the user possesses.

    Declaration
    public IReadOnlyCollection<SocketRole> Roles { get; }
    Property Value
    Type Description
    IReadOnlyCollection<SocketRole>
    | Improve this Doc View Source

    TimedOutUntil

    Declaration
    public DateTimeOffset? TimedOutUntil { get; }
    Property Value
    Type Description
    Nullable<DateTimeOffset>
    | Improve this Doc View Source

    Username

    Declaration
    public override string Username { get; }
    Property Value
    Type Description
    String
    Overrides
    SocketUser.Username
    | Improve this Doc View Source

    VoiceChannel

    Returns the voice channel the user is in, or null if none.

    Declaration
    public SocketVoiceChannel VoiceChannel { get; }
    Property Value
    Type Description
    SocketVoiceChannel
    | Improve this Doc View Source

    VoiceSessionId

    Declaration
    public string VoiceSessionId { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    VoiceState

    Gets the voice connection status of the user if any.

    Declaration
    public SocketVoiceState? VoiceState { get; }
    Property Value
    Type Description
    Nullable<SocketVoiceState>

    A SocketVoiceState representing the user's voice status; null if the user is not connected to a voice channel.

    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
    Task
    | Improve this Doc View Source

    AddRoleAsync(UInt64, RequestOptions)

    Declaration
    public Task AddRoleAsync(ulong roleId, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 roleId
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    AddRolesAsync(IEnumerable<IRole>, RequestOptions)

    Declaration
    public Task AddRolesAsync(IEnumerable<IRole> roles, RequestOptions options = null)
    Parameters
    Type Name Description
    IEnumerable<IRole> roles
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    AddRolesAsync(IEnumerable<UInt64>, RequestOptions)

    Declaration
    public Task AddRolesAsync(IEnumerable<ulong> roleIds, RequestOptions options = null)
    Parameters
    Type Name Description
    IEnumerable<UInt64> roleIds
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    GetDisplayAvatarUrl(ImageFormat, UInt16)

    Declaration
    public string GetDisplayAvatarUrl(ImageFormat format = ImageFormat.Auto, ushort size = null)
    Parameters
    Type Name Description
    ImageFormat format
    UInt16 size
    Returns
    Type Description
    String
    | Improve this Doc View Source

    GetGuildAvatarUrl(ImageFormat, UInt16)

    Declaration
    public string GetGuildAvatarUrl(ImageFormat format = ImageFormat.Auto, ushort size = null)
    Parameters
    Type Name Description
    ImageFormat format
    UInt16 size
    Returns
    Type Description
    String
    | Improve this Doc View Source

    GetPermissions(IGuildChannel)

    Gets the level permissions granted to this user to a given channel.

    Declaration
    public ChannelPermissions GetPermissions(IGuildChannel channel)
    Parameters
    Type Name Description
    IGuildChannel channel

    The channel to get the permission from.

    Returns
    Type Description
    ChannelPermissions

    A ChannelPermissions structure representing the permissions that a user has in the specified channel.

    | Improve this Doc View Source

    KickAsync(String, RequestOptions)

    Declaration
    public Task KickAsync(string reason = null, RequestOptions options = null)
    Parameters
    Type Name Description
    String reason
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    ModifyAsync(Action<GuildUserProperties>, RequestOptions)

    Declaration
    public Task ModifyAsync(Action<GuildUserProperties> func, RequestOptions options = null)
    Parameters
    Type Name Description
    Action<GuildUserProperties> func
    RequestOptions options
    Returns
    Type Description
    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
    Task
    | Improve this Doc View Source

    RemoveRoleAsync(UInt64, RequestOptions)

    Declaration
    public Task RemoveRoleAsync(ulong roleId, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 roleId
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    RemoveRolesAsync(IEnumerable<IRole>, RequestOptions)

    Declaration
    public Task RemoveRolesAsync(IEnumerable<IRole> roles, RequestOptions options = null)
    Parameters
    Type Name Description
    IEnumerable<IRole> roles
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    RemoveRolesAsync(IEnumerable<UInt64>, RequestOptions)

    Declaration
    public Task RemoveRolesAsync(IEnumerable<ulong> roleIds, RequestOptions options = null)
    Parameters
    Type Name Description
    IEnumerable<UInt64> roleIds
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    RemoveTimeOutAsync(RequestOptions)

    Declaration
    public Task RemoveTimeOutAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    SetTimeOutAsync(TimeSpan, RequestOptions)

    Declaration
    public Task SetTimeOutAsync(TimeSpan span, RequestOptions options = null)
    Parameters
    Type Name Description
    TimeSpan span
    RequestOptions options
    Returns
    Type Description
    Task

    Explicit Interface Implementations

    | Improve this Doc View Source

    IGuildUser.Guild

    Gets the guild for this user.

    Declaration
    IGuild IGuildUser.Guild { get; }
    Returns
    Type Description
    IGuild

    A guild object that this user belongs to.

    | Improve this Doc View Source

    IVoiceState.VoiceChannel

    Gets the voice channel this user is currently in.

    Declaration
    IVoiceChannel IVoiceState.VoiceChannel { get; }
    Returns
    Type Description
    IVoiceChannel

    A generic voice channel object representing the voice channel that the user is currently in; null if none.

    Implements

    IEntity<TId>
    IGuildUser
    IUser
    ISnowflakeEntity
    IEntity<TId>
    IMentionable
    IPresence
    IVoiceState

    Theme

    • Improve this Doc
    • View Source
    In This Article
    Back to top Discord.Net (c) 2015-2022 3.9.0