Search Results for

    Show / Hide Table of Contents

    Interface IGuild

    Represents a generic guild/server.

    Inherited Members
    IDeletable.DeleteAsync(RequestOptions)
    ISnowflakeEntity.CreatedAt
    IEntity<UInt64>.Id
    Namespace: Discord
    Assembly: Discord.Net.Core.dll
    Syntax
    public interface IGuild : IDeletable, ISnowflakeEntity, IEntity<ulong>

    Properties

    | Improve this Doc View Source

    AFKChannelId

    Gets the ID of the AFK voice channel for this guild.

    Declaration
    ulong? AFKChannelId { get; }
    Property Value
    Type Description
    Nullable<UInt64>

    A langword_csharp_ulong representing the snowflake identifier of the AFK voice channel; null if none is set.

    | Improve this Doc View Source

    AFKTimeout

    Gets the amount of time (in seconds) a user must be inactive in a voice channel for until they are automatically moved to the AFK voice channel.

    Declaration
    int AFKTimeout { get; }
    Property Value
    Type Description
    Int32

    An langword_csharp_int representing the amount of time in seconds for a user to be marked as inactive and moved into the AFK voice channel.

    | Improve this Doc View Source

    ApplicationId

    Gets the application ID of the guild creator if it is bot-created.

    Declaration
    ulong? ApplicationId { get; }
    Property Value
    Type Description
    Nullable<UInt64>

    A langword_csharp_ulong representing the snowflake identifier of the application ID that created this guild, or null if it was not bot-created.

    | Improve this Doc View Source

    ApproximateMemberCount

    Gets the approximate number of members in this guild.

    Declaration
    int? ApproximateMemberCount { get; }
    Property Value
    Type Description
    Nullable<Int32>

    The approximate number of members in this guild.

    Remarks

    Only available when getting a guild via REST when with_counts is true.

    | Improve this Doc View Source

    ApproximatePresenceCount

    Gets the approximate number of non-offline members in this guild.

    Declaration
    int? ApproximatePresenceCount { get; }
    Property Value
    Type Description
    Nullable<Int32>

    The approximate number of non-offline members in this guild.

    Remarks

    Only available when getting a guild via REST when with_counts is true.

    | Improve this Doc View Source

    AudioClient

    Gets the IAudioClient currently associated with this guild.

    Declaration
    IAudioClient AudioClient { get; }
    Property Value
    Type Description
    IAudioClient

    An IAudioClient currently associated with this guild.

    | Improve this Doc View Source

    Available

    Determines if this guild is currently connected and ready to be used.

    Declaration
    bool Available { get; }
    Property Value
    Type Description
    Boolean

    true if this guild is currently connected and ready to be used; otherwise false.

    Remarks

    note

    This property only applies to a WebSocket-based client.

    This boolean is used to determine if the guild is currently connected to the WebSocket and is ready to be used/accessed.

    | Improve this Doc View Source

    BannerId

    Gets the identifier for this guilds banner image.

    Declaration
    string BannerId { get; }
    Property Value
    Type Description
    String

    An identifier for the banner image; null if none is set.

    | Improve this Doc View Source

    BannerUrl

    Gets the URL of this guild's banner image.

    Declaration
    string BannerUrl { get; }
    Property Value
    Type Description
    String

    A URL pointing to the guild's banner image; null if none is set.

    | Improve this Doc View Source

    DefaultMessageNotifications

    Gets the default message notifications for users who haven't explicitly set their notification settings.

    Declaration
    DefaultMessageNotifications DefaultMessageNotifications { get; }
    Property Value
    Type Description
    DefaultMessageNotifications
    | Improve this Doc View Source

    Description

    Gets the description for the guild.

    Declaration
    string Description { get; }
    Property Value
    Type Description
    String

    The description for the guild; null if none is set.

    | Improve this Doc View Source

    DiscoverySplashId

    Gets the ID of this guild's discovery splash image.

    Declaration
    string DiscoverySplashId { get; }
    Property Value
    Type Description
    String

    An identifier for the discovery splash image; null if none is set.

    | Improve this Doc View Source

    DiscoverySplashUrl

    Gets the URL of this guild's discovery splash image.

    Declaration
    string DiscoverySplashUrl { get; }
    Property Value
    Type Description
    String

    A URL pointing to the guild's discovery splash image; null if none is set.

    | Improve this Doc View Source

    Emotes

    Gets a collection of all custom emotes for this guild.

    Declaration
    IReadOnlyCollection<GuildEmote> Emotes { get; }
    Property Value
    Type Description
    IReadOnlyCollection<GuildEmote>

    A read-only collection of all custom emotes for this guild.

    | Improve this Doc View Source

    EveryoneRole

    Gets the built-in role containing all users in this guild.

    Declaration
    IRole EveryoneRole { get; }
    Property Value
    Type Description
    IRole

    A role object that represents an @everyone role in this guild.

    | Improve this Doc View Source

    ExplicitContentFilter

    Gets the level of content filtering applied to user's content in a Guild.

    Declaration
    ExplicitContentFilterLevel ExplicitContentFilter { get; }
    Property Value
    Type Description
    ExplicitContentFilterLevel

    The level of explicit content filtering.

    | Improve this Doc View Source

    Features

    Gets the features for this guild.

    Declaration
    GuildFeatures Features { get; }
    Property Value
    Type Description
    GuildFeatures

    A flags enum containing all the features for the guild.

    | Improve this Doc View Source

    IconId

    Gets the ID of this guild's icon.

    Declaration
    string IconId { get; }
    Property Value
    Type Description
    String

    An identifier for the splash image; null if none is set.

    | Improve this Doc View Source

    IconUrl

    Gets the URL of this guild's icon.

    Declaration
    string IconUrl { get; }
    Property Value
    Type Description
    String

    A URL pointing to the guild's icon; null if none is set.

    | Improve this Doc View Source

    IsBoostProgressBarEnabled

    Gets whether the guild has the boost progress bar enabled.

    Declaration
    bool IsBoostProgressBarEnabled { get; }
    Property Value
    Type Description
    Boolean

    true if the boost progress bar is enabled; otherwise false.

    | Improve this Doc View Source

    IsWidgetEnabled

    Gets a value that indicates whether this guild has the widget enabled.

    Declaration
    bool IsWidgetEnabled { get; }
    Property Value
    Type Description
    Boolean

    true if this guild has a widget enabled; otherwise false.

    | Improve this Doc View Source

    MaxBitrate

    Gets the max bitrate for voice channels in this guild.

    Declaration
    int MaxBitrate { get; }
    Property Value
    Type Description
    Int32

    A representing the maximum bitrate value allowed by Discord in this guild.

    | Improve this Doc View Source

    MaxMembers

    Gets the maximum number of members for the guild.

    Declaration
    int? MaxMembers { get; }
    Property Value
    Type Description
    Nullable<Int32>

    The maximum number of members for the guild.

    | Improve this Doc View Source

    MaxPresences

    Gets the maximum number of presences for the guild.

    Declaration
    int? MaxPresences { get; }
    Property Value
    Type Description
    Nullable<Int32>

    The maximum number of presences for the guild.

    | Improve this Doc View Source

    MaxUploadLimit

    Gets the upload limit in bytes for this guild. This number is dependent on the guild's boost status.

    Declaration
    ulong MaxUploadLimit { get; }
    Property Value
    Type Description
    UInt64
    | Improve this Doc View Source

    MaxVideoChannelUsers

    Gets the maximum amount of users in a video channel.

    Declaration
    int? MaxVideoChannelUsers { get; }
    Property Value
    Type Description
    Nullable<Int32>

    The maximum amount of users in a video channel.

    | Improve this Doc View Source

    MfaLevel

    Gets the level of Multi-Factor Authentication requirements a user must fulfill before being allowed to perform administrative actions in this guild.

    Declaration
    MfaLevel MfaLevel { get; }
    Property Value
    Type Description
    MfaLevel

    The level of MFA requirement.

    | Improve this Doc View Source

    Name

    Gets the name of this guild.

    Declaration
    string Name { get; }
    Property Value
    Type Description
    String

    A string containing the name of this guild.

    | Improve this Doc View Source

    NsfwLevel

    Gets the NSFW level of this guild.

    Declaration
    NsfwLevel NsfwLevel { get; }
    Property Value
    Type Description
    NsfwLevel

    The NSFW level of this guild.

    | Improve this Doc View Source

    OwnerId

    Gets the ID of the user that owns this guild.

    Declaration
    ulong OwnerId { get; }
    Property Value
    Type Description
    UInt64

    A langword_csharp_ulong representing the snowflake identifier of the user that owns this guild.

    | Improve this Doc View Source

    PreferredCulture

    Gets the preferred culture of this guild.

    Declaration
    CultureInfo PreferredCulture { get; }
    Property Value
    Type Description
    CultureInfo

    The preferred culture information of this guild.

    | Improve this Doc View Source

    PreferredLocale

    Gets the preferred locale of this guild in IETF BCP 47 language tag format.

    Declaration
    string PreferredLocale { get; }
    Property Value
    Type Description
    String

    The preferred locale of the guild in IETF BCP 47 language tag format.

    | Improve this Doc View Source

    PremiumSubscriptionCount

    Gets the number of premium subscribers of this guild.

    Declaration
    int PremiumSubscriptionCount { get; }
    Property Value
    Type Description
    Int32

    The number of premium subscribers of this guild; null if not available.

    Remarks

    This is the number of users who have boosted this guild.

    | Improve this Doc View Source

    PremiumTier

    Gets the tier of guild boosting in this guild.

    Declaration
    PremiumTier PremiumTier { get; }
    Property Value
    Type Description
    PremiumTier

    The tier of guild boosting in this guild.

    | Improve this Doc View Source

    PublicUpdatesChannelId

    Gets the ID of the channel where admins and moderators of Community guilds receive notices from Discord.

    Declaration
    ulong? PublicUpdatesChannelId { get; }
    Property Value
    Type Description
    Nullable<UInt64>

    A langword_csharp_ulong representing the snowflake identifier of the channel where admins and moderators of Community guilds receive notices from Discord; null if none is set.

    | Improve this Doc View Source

    Roles

    Gets a collection of all roles in this guild.

    Declaration
    IReadOnlyCollection<IRole> Roles { get; }
    Property Value
    Type Description
    IReadOnlyCollection<IRole>

    A read-only collection of roles found within this guild.

    | Improve this Doc View Source

    RulesChannelId

    Gets the ID of the channel with the rules.

    Declaration
    ulong? RulesChannelId { get; }
    Property Value
    Type Description
    Nullable<UInt64>

    A langword_csharp_ulong representing the snowflake identifier of the channel that contains the rules; null if none is set.

    | Improve this Doc View Source

    SplashId

    Gets the ID of this guild's splash image.

    Declaration
    string SplashId { get; }
    Property Value
    Type Description
    String

    An identifier for the splash image; null if none is set.

    | Improve this Doc View Source

    SplashUrl

    Gets the URL of this guild's splash image.

    Declaration
    string SplashUrl { get; }
    Property Value
    Type Description
    String

    A URL pointing to the guild's splash image; null if none is set.

    | Improve this Doc View Source

    Stickers

    Gets a collection of all custom stickers for this guild.

    Declaration
    IReadOnlyCollection<ICustomSticker> Stickers { get; }
    Property Value
    Type Description
    IReadOnlyCollection<ICustomSticker>

    A read-only collection of all custom stickers for this guild.

    | Improve this Doc View Source

    SystemChannelFlags

    Gets the flags for the types of system channel messages that are disabled.

    Declaration
    SystemChannelMessageDeny SystemChannelFlags { get; }
    Property Value
    Type Description
    SystemChannelMessageDeny

    The flags for the types of system channel messages that are disabled.

    | Improve this Doc View Source

    SystemChannelId

    Gets the ID of the channel where randomized welcome messages are sent.

    Declaration
    ulong? SystemChannelId { get; }
    Property Value
    Type Description
    Nullable<UInt64>

    A langword_csharp_ulong representing the snowflake identifier of the system channel where randomized welcome messages are sent; null if none is set.

    | Improve this Doc View Source

    VanityURLCode

    Gets the code for this guild's vanity invite URL.

    Declaration
    string VanityURLCode { get; }
    Property Value
    Type Description
    String

    A string containing the vanity invite code for this guild; null if none is set.

    | Improve this Doc View Source

    VerificationLevel

    Gets the level of requirements a user must fulfill before being allowed to post messages in this guild.

    Declaration
    VerificationLevel VerificationLevel { get; }
    Property Value
    Type Description
    VerificationLevel

    The level of requirements.

    | Improve this Doc View Source

    VoiceRegionId

    Gets the ID of the region hosting this guild's voice channels.

    Declaration
    string VoiceRegionId { get; }
    Property Value
    Type Description
    String

    A string containing the identifier for the voice region that this guild uses (e.g. eu-central).

    | Improve this Doc View Source

    WidgetChannelId

    Gets the ID of the channel assigned to the widget of this guild.

    Declaration
    ulong? WidgetChannelId { get; }
    Property Value
    Type Description
    Nullable<UInt64>

    A langword_csharp_ulong representing the snowflake identifier of the channel assigned to the widget found within the widget settings of this guild; null if none is set.

    Methods

    | Improve this Doc View Source

    AddBanAsync(IUser, Int32, String, RequestOptions)

    Bans the user from this guild and optionally prunes their recent messages.

    Declaration
    Task AddBanAsync(IUser user, int pruneDays = 0, string reason = null, RequestOptions options = null)
    Parameters
    Type Name Description
    IUser user

    The user to ban.

    Int32 pruneDays

    The number of days to remove messages from this user for, and this number must be between [0, 7].

    String reason

    The reason of the ban to be written in the audit log.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous add operation for the ban.

    | Improve this Doc View Source

    AddBanAsync(UInt64, Int32, String, RequestOptions)

    Bans the user from this guild and optionally prunes their recent messages.

    Declaration
    Task AddBanAsync(ulong userId, int pruneDays = 0, string reason = null, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 userId

    The snowflake ID of the user to ban.

    Int32 pruneDays

    The number of days to remove messages from this user for, and this number must be between [0, 7].

    String reason

    The reason of the ban to be written in the audit log.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous add operation for the ban.

    | Improve this Doc View Source

    AddGuildUserAsync(UInt64, String, Action<AddGuildUserProperties>, RequestOptions)

    Adds a user to this guild.

    Declaration
    Task<IGuildUser> AddGuildUserAsync(ulong userId, string accessToken, Action<AddGuildUserProperties> func = null, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 userId

    The snowflake identifier of the user.

    String accessToken

    The OAuth2 access token for the user, requested with the guilds.join scope.

    Action<AddGuildUserProperties> func

    The delegate containing the properties to be applied to the user upon being added to the guild.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IGuildUser>

    A guild user associated with the specified userId; null if the user is already in the guild.

    Remarks

    This method requires you have an OAuth2 access token for the user, requested with the guilds.join scope, and that the bot have the MANAGE_INVITES permission in the guild.

    | Improve this Doc View Source

    BulkOverwriteApplicationCommandsAsync(ApplicationCommandProperties[], RequestOptions)

    Overwrites the application commands within this guild.

    Declaration
    Task<IReadOnlyCollection<IApplicationCommand>> BulkOverwriteApplicationCommandsAsync(ApplicationCommandProperties[] properties, RequestOptions options = null)
    Parameters
    Type Name Description
    ApplicationCommandProperties[] properties

    A collection of properties to use when creating the commands.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<IApplicationCommand>>

    A task that represents the asynchronous creation operation. The task result contains a collection of commands that was created.

    | Improve this Doc View Source

    CreateApplicationCommandAsync(ApplicationCommandProperties, RequestOptions)

    Creates an application command within this guild.

    Declaration
    Task<IApplicationCommand> CreateApplicationCommandAsync(ApplicationCommandProperties properties, RequestOptions options = null)
    Parameters
    Type Name Description
    ApplicationCommandProperties properties

    The properties to use when creating the command.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IApplicationCommand>

    A task that represents the asynchronous creation operation. The task result contains the command that was created.

    | Improve this Doc View Source

    CreateCategoryAsync(String, Action<GuildChannelProperties>, RequestOptions)

    Creates a new channel category in this guild.

    Declaration
    Task<ICategoryChannel> CreateCategoryAsync(string name, Action<GuildChannelProperties> func = null, RequestOptions options = null)
    Parameters
    Type Name Description
    String name

    The new name for the category.

    Action<GuildChannelProperties> func

    The delegate containing the properties to be applied to the channel upon its creation.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<ICategoryChannel>

    A task that represents the asynchronous creation operation. The task result contains the newly created category channel.

    | Improve this Doc View Source

    CreateEmoteAsync(String, Image, Optional<IEnumerable<IRole>>, RequestOptions)

    Creates a new GuildEmote in this guild.

    Declaration
    Task<GuildEmote> CreateEmoteAsync(string name, Image image, Optional<IEnumerable<IRole>> roles = default(Optional<IEnumerable<IRole>>), RequestOptions options = null)
    Parameters
    Type Name Description
    String name

    The name of the guild emote.

    Image image

    The image of the new emote.

    Optional<IEnumerable<IRole>> roles

    The roles to limit the emote usage to.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<GuildEmote>

    A task that represents the asynchronous creation operation. The task result contains the created emote.

    | Improve this Doc View Source

    CreateEventAsync(String, DateTimeOffset, GuildScheduledEventType, GuildScheduledEventPrivacyLevel, String, Nullable<DateTimeOffset>, Nullable<UInt64>, String, Nullable<Image>, RequestOptions)

    Creates an event within this guild.

    Declaration
    Task<IGuildScheduledEvent> CreateEventAsync(string name, DateTimeOffset startTime, GuildScheduledEventType type, GuildScheduledEventPrivacyLevel privacyLevel = default(GuildScheduledEventPrivacyLevel), string description = null, DateTimeOffset? endTime = null, ulong? channelId = null, string location = null, Image? coverImage = null, RequestOptions options = null)
    Parameters
    Type Name Description
    String name

    The name of the event.

    DateTimeOffset startTime

    The start time of the event.

    GuildScheduledEventType type

    The type of the event.

    GuildScheduledEventPrivacyLevel privacyLevel

    The privacy level of the event.

    String description

    The description of the event.

    Nullable<DateTimeOffset> endTime

    The end time of the event.

    Nullable<UInt64> channelId

    The channel id of the event. The event must have a type of Stage or Voice in order to use this property.

    String location

    The location of the event; links are supported

    Nullable<Image> coverImage

    The optional banner image for the event.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IGuildScheduledEvent>

    A task that represents the asynchronous create operation.

    | Improve this Doc View Source

    CreateRoleAsync(String, Nullable<GuildPermissions>, Nullable<Color>, Boolean, RequestOptions)

    Creates a new role with the provided name.

    Declaration
    Task<IRole> CreateRoleAsync(string name, GuildPermissions? permissions = null, Color? color = null, bool isHoisted = false, RequestOptions options = null)
    Parameters
    Type Name Description
    String name

    The new name for the role.

    Nullable<GuildPermissions> permissions

    The guild permission that the role should possess.

    Nullable<Color> color

    The color of the role.

    Boolean isHoisted

    Whether the role is separated from others on the sidebar.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IRole>

    A task that represents the asynchronous creation operation. The task result contains the newly created role.

    | Improve this Doc View Source

    CreateRoleAsync(String, Nullable<GuildPermissions>, Nullable<Color>, Boolean, Boolean, RequestOptions)

    Creates a new role with the provided name.

    Declaration
    Task<IRole> CreateRoleAsync(string name, GuildPermissions? permissions = null, Color? color = null, bool isHoisted = false, bool isMentionable = false, RequestOptions options = null)
    Parameters
    Type Name Description
    String name

    The new name for the role.

    Nullable<GuildPermissions> permissions

    The guild permission that the role should possess.

    Nullable<Color> color

    The color of the role.

    Boolean isHoisted

    Whether the role is separated from others on the sidebar.

    Boolean isMentionable

    Whether the role can be mentioned.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IRole>

    A task that represents the asynchronous creation operation. The task result contains the newly created role.

    | Improve this Doc View Source

    CreateStageChannelAsync(String, Action<VoiceChannelProperties>, RequestOptions)

    Creates a new stage channel in this guild.

    Declaration
    Task<IStageChannel> CreateStageChannelAsync(string name, Action<VoiceChannelProperties> func = null, RequestOptions options = null)
    Parameters
    Type Name Description
    String name

    The new name for the stage channel.

    Action<VoiceChannelProperties> func

    The delegate containing the properties to be applied to the channel upon its creation.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IStageChannel>

    A task that represents the asynchronous creation operation. The task result contains the newly created stage channel.

    | Improve this Doc View Source

    CreateStickerAsync(String, String, IEnumerable<String>, Image, RequestOptions)

    Creates a new sticker in this guild.

    Declaration
    Task<ICustomSticker> CreateStickerAsync(string name, string description, IEnumerable<string> tags, Image image, RequestOptions options = null)
    Parameters
    Type Name Description
    String name

    The name of the sticker.

    String description

    The description of the sticker.

    IEnumerable<String> tags

    The tags of the sticker.

    Image image

    The image of the new emote.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<ICustomSticker>

    A task that represents the asynchronous creation operation. The task result contains the created sticker.

    | Improve this Doc View Source

    CreateStickerAsync(String, String, IEnumerable<String>, Stream, String, RequestOptions)

    Creates a new sticker in this guild.

    Declaration
    Task<ICustomSticker> CreateStickerAsync(string name, string description, IEnumerable<string> tags, Stream stream, string filename, RequestOptions options = null)
    Parameters
    Type Name Description
    String name

    The name of the sticker.

    String description

    The description of the sticker.

    IEnumerable<String> tags

    The tags of the sticker.

    Stream stream

    The stream containing the file data.

    String filename

    The name of the file with the extension, ex: image.png.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<ICustomSticker>

    A task that represents the asynchronous creation operation. The task result contains the created sticker.

    | Improve this Doc View Source

    CreateStickerAsync(String, String, IEnumerable<String>, String, RequestOptions)

    Creates a new sticker in this guild.

    Declaration
    Task<ICustomSticker> CreateStickerAsync(string name, string description, IEnumerable<string> tags, string path, RequestOptions options = null)
    Parameters
    Type Name Description
    String name

    The name of the sticker.

    String description

    The description of the sticker.

    IEnumerable<String> tags

    The tags of the sticker.

    String path

    The path of the file to upload.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<ICustomSticker>

    A task that represents the asynchronous creation operation. The task result contains the created sticker.

    | Improve this Doc View Source

    CreateTextChannelAsync(String, Action<TextChannelProperties>, RequestOptions)

    Creates a new text channel in this guild.

    Declaration
    Task<ITextChannel> CreateTextChannelAsync(string name, Action<TextChannelProperties> func = null, RequestOptions options = null)
    Parameters
    Type Name Description
    String name

    The new name for the text channel.

    Action<TextChannelProperties> func

    The delegate containing the properties to be applied to the channel upon its creation.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<ITextChannel>

    A task that represents the asynchronous creation operation. The task result contains the newly created text channel.

    Examples

    The following example creates a new text channel under an existing category named Wumpus with a set topic.

    | Improve this Doc View Source

    CreateVoiceChannelAsync(String, Action<VoiceChannelProperties>, RequestOptions)

    Creates a new voice channel in this guild.

    Declaration
    Task<IVoiceChannel> CreateVoiceChannelAsync(string name, Action<VoiceChannelProperties> func = null, RequestOptions options = null)
    Parameters
    Type Name Description
    String name

    The new name for the voice channel.

    Action<VoiceChannelProperties> func

    The delegate containing the properties to be applied to the channel upon its creation.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IVoiceChannel>

    A task that represents the asynchronous creation operation. The task result contains the newly created voice channel.

    | Improve this Doc View Source

    DeleteEmoteAsync(GuildEmote, RequestOptions)

    Deletes an existing GuildEmote from this guild.

    Declaration
    Task DeleteEmoteAsync(GuildEmote emote, RequestOptions options = null)
    Parameters
    Type Name Description
    GuildEmote emote

    The emote to delete.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous removal operation.

    | Improve this Doc View Source

    DeleteIntegrationAsync(UInt64, RequestOptions)

    Deletes an integration.

    Declaration
    Task DeleteIntegrationAsync(ulong id, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 id

    The id for the integration.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous removal operation.

    | Improve this Doc View Source

    DeleteStickerAsync(ICustomSticker, RequestOptions)

    Deletes a sticker within this guild.

    Declaration
    Task DeleteStickerAsync(ICustomSticker sticker, RequestOptions options = null)
    Parameters
    Type Name Description
    ICustomSticker sticker

    The sticker to delete.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous removal operation.

    | Improve this Doc View Source

    DisconnectAsync(IGuildUser)

    Disconnects the user from its current voice channel.

    Declaration
    Task DisconnectAsync(IGuildUser user)
    Parameters
    Type Name Description
    IGuildUser user

    The user to disconnect.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation for disconnecting a user.

    | Improve this Doc View Source

    DownloadUsersAsync()

    Downloads all users for this guild if the current list is incomplete.

    Declaration
    Task DownloadUsersAsync()
    Returns
    Type Description
    Task

    A task that represents the asynchronous download operation.

    Remarks

    This method downloads all users found within this guild through the Gateway and caches them.

    | Improve this Doc View Source

    GetAFKChannelAsync(CacheMode, RequestOptions)

    Gets the AFK voice channel in this guild.

    Declaration
    Task<IVoiceChannel> GetAFKChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IVoiceChannel>

    A task that represents the asynchronous get operation. The task result contains the voice channel that the AFK users will be moved to after they have idled for too long; null if none is set.

    | Improve this Doc View Source

    GetApplicationCommandAsync(UInt64, CacheMode, RequestOptions)

    Gets an application command within this guild with the specified id.

    Declaration
    Task<IApplicationCommand> GetApplicationCommandAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 id

    The id of the application command to get.

    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IApplicationCommand>

    A ValueTask that represents the asynchronous get operation. The task result contains a IApplicationCommand if found, otherwise null.

    | Improve this Doc View Source

    GetApplicationCommandsAsync(RequestOptions)

    Gets this guilds application commands.

    Declaration
    Task<IReadOnlyCollection<IApplicationCommand>> GetApplicationCommandsAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<IApplicationCommand>>

    A task that represents the asynchronous get operation. The task result contains a read-only collection of application commands found within the guild.

    | Improve this Doc View Source

    GetAuditLogsAsync(Int32, CacheMode, RequestOptions, Nullable<UInt64>, Nullable<UInt64>, Nullable<ActionType>)

    Gets the specified number of audit log entries for this guild.

    Declaration
    Task<IReadOnlyCollection<IAuditLogEntry>> GetAuditLogsAsync(int limit = null, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null, ulong? beforeId = null, ulong? userId = null, ActionType? actionType = null)
    Parameters
    Type Name Description
    Int32 limit

    The number of audit log entries to fetch.

    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Nullable<UInt64> beforeId

    The audit log entry ID to get entries before.

    Nullable<UInt64> userId

    The user ID to filter entries for.

    Nullable<ActionType> actionType

    The type of actions to filter.

    Returns
    Type Description
    Task<IReadOnlyCollection<IAuditLogEntry>>

    A task that represents the asynchronous get operation. The task result contains a read-only collection of the requested audit log entries.

    | Improve this Doc View Source

    GetBanAsync(IUser, RequestOptions)

    Gets a ban object for a banned user.

    Declaration
    Task<IBan> GetBanAsync(IUser user, RequestOptions options = null)
    Parameters
    Type Name Description
    IUser user

    The banned user.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IBan>

    A task that represents the asynchronous get operation. The task result contains a ban object, which contains the user information and the reason for the ban; null if the ban entry cannot be found.

    | Improve this Doc View Source

    GetBanAsync(UInt64, RequestOptions)

    Gets a ban object for a banned user.

    Declaration
    Task<IBan> GetBanAsync(ulong userId, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 userId

    The snowflake identifier for the banned user.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IBan>

    A task that represents the asynchronous get operation. The task result contains a ban object, which contains the user information and the reason for the ban; null if the ban entry cannot be found.

    | Improve this Doc View Source

    GetBansAsync(IUser, Direction, Int32, RequestOptions)

    Gets limit amount of bans from the guild starting at the provided fromUser ordered by user ID.

    Declaration
    IAsyncEnumerable<IReadOnlyCollection<IBan>> GetBansAsync(IUser fromUser, Direction dir, int limit = null, RequestOptions options = null)
    Parameters
    Type Name Description
    IUser fromUser

    The user to start to get bans from.

    Direction dir

    The direction of the bans to be gotten.

    Int32 limit

    The number of bans to get.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    IAsyncEnumerable<IReadOnlyCollection<IBan>>

    A paged collection of bans.

    Remarks
    important

    The returned collection is an asynchronous enumerable object; one must call FlattenAsync<T>(IAsyncEnumerable<IEnumerable<T>>) to access the individual messages as a collection.

    warning

    Do not fetch too many bans at once! This may cause unwanted preemptive rate limit or even actual rate limit, causing your bot to freeze!

    | Improve this Doc View Source

    GetBansAsync(Int32, RequestOptions)

    Gets limit amount of bans from the guild ordered by user ID.

    Declaration
    IAsyncEnumerable<IReadOnlyCollection<IBan>> GetBansAsync(int limit = null, RequestOptions options = null)
    Parameters
    Type Name Description
    Int32 limit

    The amount of bans to get from the guild.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    IAsyncEnumerable<IReadOnlyCollection<IBan>>

    A paged collection of bans.

    Remarks
    important

    The returned collection is an asynchronous enumerable object; one must call FlattenAsync<T>(IAsyncEnumerable<IEnumerable<T>>) to access the individual messages as a collection.

    warning

    Do not fetch too many bans at once! This may cause unwanted preemptive rate limit or even actual rate limit, causing your bot to freeze!

    | Improve this Doc View Source

    GetBansAsync(UInt64, Direction, Int32, RequestOptions)

    Gets limit amount of bans from the guild starting at the provided fromUserId ordered by user ID.

    Declaration
    IAsyncEnumerable<IReadOnlyCollection<IBan>> GetBansAsync(ulong fromUserId, Direction dir, int limit = null, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 fromUserId

    The ID of the user to start to get bans from.

    Direction dir

    The direction of the bans to be gotten.

    Int32 limit

    The number of bans to get.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    IAsyncEnumerable<IReadOnlyCollection<IBan>>

    A paged collection of bans.

    Remarks
    important

    The returned collection is an asynchronous enumerable object; one must call FlattenAsync<T>(IAsyncEnumerable<IEnumerable<T>>) to access the individual messages as a collection.

    warning

    Do not fetch too many bans at once! This may cause unwanted preemptive rate limit or even actual rate limit, causing your bot to freeze!

    | Improve this Doc View Source

    GetCategoriesAsync(CacheMode, RequestOptions)

    Gets a collection of all category channels in this guild.

    Declaration
    Task<IReadOnlyCollection<ICategoryChannel>> GetCategoriesAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<ICategoryChannel>>

    A task that represents the asynchronous get operation. The task result contains a read-only collection of category channels found within this guild.

    | Improve this Doc View Source

    GetChannelAsync(UInt64, CacheMode, RequestOptions)

    Gets a channel in this guild.

    Declaration
    Task<IGuildChannel> GetChannelAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 id

    The snowflake identifier for the channel.

    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IGuildChannel>

    A task that represents the asynchronous get operation. The task result contains the generic channel associated with the specified id; null if none is found.

    | Improve this Doc View Source

    GetChannelsAsync(CacheMode, RequestOptions)

    Gets a collection of all channels in this guild.

    Declaration
    Task<IReadOnlyCollection<IGuildChannel>> GetChannelsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<IGuildChannel>>

    A task that represents the asynchronous get operation. The task result contains a read-only collection of generic channels found within this guild.

    | Improve this Doc View Source

    GetCurrentUserAsync(CacheMode, RequestOptions)

    Gets the current user for this guild.

    Declaration
    Task<IGuildUser> GetCurrentUserAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IGuildUser>

    A task that represents the asynchronous get operation. The task result contains the currently logged-in user within this guild.

    | Improve this Doc View Source

    GetDefaultChannelAsync(CacheMode, RequestOptions)

    Gets the first viewable text channel in this guild.

    Declaration
    Task<ITextChannel> GetDefaultChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<ITextChannel>

    A task that represents the asynchronous get operation. The task result contains the first viewable text channel in this guild; null if none is found.

    | Improve this Doc View Source

    GetEmoteAsync(UInt64, RequestOptions)

    Gets a specific emote from this guild.

    Declaration
    Task<GuildEmote> GetEmoteAsync(ulong id, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 id

    The snowflake identifier for the guild emote.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<GuildEmote>

    A task that represents the asynchronous get operation. The task result contains the emote found with the specified id; null if none is found.

    | Improve this Doc View Source

    GetEmotesAsync(RequestOptions)

    Gets a collection of emotes from this guild.

    Declaration
    Task<IReadOnlyCollection<GuildEmote>> GetEmotesAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<GuildEmote>>

    A task that represents the asynchronous get operation. The task result contains a read-only collection of emotes found within the guild.

    | Improve this Doc View Source

    GetEventAsync(UInt64, RequestOptions)

    Gets a event within this guild.

    Declaration
    Task<IGuildScheduledEvent> GetEventAsync(ulong id, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 id

    The id of the event.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IGuildScheduledEvent>

    A task that represents the asynchronous get operation.

    | Improve this Doc View Source

    GetEventsAsync(RequestOptions)

    Gets a collection of events within this guild.

    Declaration
    Task<IReadOnlyCollection<IGuildScheduledEvent>> GetEventsAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<IGuildScheduledEvent>>

    A task that represents the asynchronous get operation.

    | Improve this Doc View Source

    GetIntegrationsAsync(RequestOptions)

    Gets a collection of all the integrations this guild contains.

    Declaration
    Task<IReadOnlyCollection<IIntegration>> GetIntegrationsAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<IIntegration>>

    A task that represents the asynchronous get operation. The task result contains a read-only collection of integrations the guild can has.

    | Improve this Doc View Source

    GetInvitesAsync(RequestOptions)

    Gets a collection of all invites in this guild.

    Declaration
    Task<IReadOnlyCollection<IInviteMetadata>> GetInvitesAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<IInviteMetadata>>

    A task that represents the asynchronous get operation. The task result contains a read-only collection of invite metadata, each representing information for an invite found within this guild.

    | Improve this Doc View Source

    GetOwnerAsync(CacheMode, RequestOptions)

    Gets the owner of this guild.

    Declaration
    Task<IGuildUser> GetOwnerAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IGuildUser>

    A task that represents the asynchronous get operation. The task result contains the owner of this guild.

    | Improve this Doc View Source

    GetPublicUpdatesChannelAsync(CacheMode, RequestOptions)

    Gets the text channel where admins and moderators of Community guilds receive notices from Discord.

    Declaration
    Task<ITextChannel> GetPublicUpdatesChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<ITextChannel>

    A task that represents the asynchronous get operation. The task result contains the text channel where admins and moderators of Community guilds receive notices from Discord; null if none is set.

    | Improve this Doc View Source

    GetRole(UInt64)

    Gets a role in this guild.

    Declaration
    IRole GetRole(ulong id)
    Parameters
    Type Name Description
    UInt64 id

    The snowflake identifier for the role.

    Returns
    Type Description
    IRole

    A role that is associated with the specified id; null if none is found.

    | Improve this Doc View Source

    GetRulesChannelAsync(CacheMode, RequestOptions)

    Gets the text channel where Community guilds can display rules and/or guidelines.

    Declaration
    Task<ITextChannel> GetRulesChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<ITextChannel>

    A task that represents the asynchronous get operation. The task result contains the text channel where Community guilds can display rules and/or guidelines; null if none is set.

    | Improve this Doc View Source

    GetStageChannelAsync(UInt64, CacheMode, RequestOptions)

    Gets a stage channel in this guild.

    Declaration
    Task<IStageChannel> GetStageChannelAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 id

    The snowflake identifier for the stage channel.

    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IStageChannel>

    A task that represents the asynchronous get operation. The task result contains the stage channel associated with the specified id; null if none is found.

    | Improve this Doc View Source

    GetStageChannelsAsync(CacheMode, RequestOptions)

    Gets a collection of all stage channels in this guild.

    Declaration
    Task<IReadOnlyCollection<IStageChannel>> GetStageChannelsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<IStageChannel>>

    A task that represents the asynchronous get operation. The task result contains a read-only collection of stage channels found within this guild.

    | Improve this Doc View Source

    GetStickerAsync(UInt64, CacheMode, RequestOptions)

    Gets a specific sticker within this guild.

    Declaration
    Task<ICustomSticker> GetStickerAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 id

    The id of the sticker to get.

    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<ICustomSticker>

    A task that represents the asynchronous get operation. The task result contains the sticker found with the specified id; null if none is found.

    | Improve this Doc View Source

    GetStickersAsync(CacheMode, RequestOptions)

    Gets a collection of all stickers within this guild.

    Declaration
    Task<IReadOnlyCollection<ICustomSticker>> GetStickersAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<ICustomSticker>>

    A task that represents the asynchronous get operation. The task result contains a read-only collection of stickers found within the guild.

    | Improve this Doc View Source

    GetSystemChannelAsync(CacheMode, RequestOptions)

    Gets the system channel where randomized welcome messages are sent in this guild.

    Declaration
    Task<ITextChannel> GetSystemChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<ITextChannel>

    A task that represents the asynchronous get operation. The task result contains the text channel where randomized welcome messages will be sent to; null if none is set.

    | Improve this Doc View Source

    GetTextChannelAsync(UInt64, CacheMode, RequestOptions)

    Gets a text channel in this guild.

    Declaration
    Task<ITextChannel> GetTextChannelAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 id

    The snowflake identifier for the text channel.

    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<ITextChannel>

    A task that represents the asynchronous get operation. The task result contains the text channel associated with the specified id; null if none is found.

    | Improve this Doc View Source

    GetTextChannelsAsync(CacheMode, RequestOptions)

    Gets a collection of all text channels in this guild.

    Declaration
    Task<IReadOnlyCollection<ITextChannel>> GetTextChannelsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<ITextChannel>>

    A task that represents the asynchronous get operation. The task result contains a read-only collection of message channels found within this guild.

    | Improve this Doc View Source

    GetThreadChannelAsync(UInt64, CacheMode, RequestOptions)

    Gets a thread channel within this guild.

    Declaration
    Task<IThreadChannel> GetThreadChannelAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 id

    The id of the thread channel.

    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IThreadChannel>

    A task that represents the asynchronous get operation. The task result contains the thread channel.

    | Improve this Doc View Source

    GetThreadChannelsAsync(CacheMode, RequestOptions)

    Gets a collection of all thread channels in this guild.

    Declaration
    Task<IReadOnlyCollection<IThreadChannel>> GetThreadChannelsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<IThreadChannel>>

    A task that represents the asynchronous get operation. The task result contains a read-only collection of thread channels found within this guild.

    | Improve this Doc View Source

    GetUserAsync(UInt64, CacheMode, RequestOptions)

    Gets a user from this guild.

    Declaration
    Task<IGuildUser> GetUserAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 id

    The snowflake identifier of the user.

    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IGuildUser>

    A task that represents the asynchronous get operation. The task result contains the guild user associated with the specified id; null if none is found.

    Remarks

    This method retrieves a user found within this guild.

    note

    This may return null in the WebSocket implementation due to incomplete user collection in large guilds.

    | Improve this Doc View Source

    GetUsersAsync(CacheMode, RequestOptions)

    Gets a collection of all users in this guild.

    Declaration
    Task<IReadOnlyCollection<IGuildUser>> GetUsersAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<IGuildUser>>

    A task that represents the asynchronous get operation. The task result contains a collection of guild users found within this guild.

    Remarks

    This method retrieves all users found within this guild.

    note

    This may return an incomplete collection in the WebSocket implementation due to how Discord does not send a complete user list for large guilds.

    | Improve this Doc View Source

    GetVanityInviteAsync(RequestOptions)

    Gets the vanity invite URL of this guild.

    Declaration
    Task<IInviteMetadata> GetVanityInviteAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IInviteMetadata>

    A task that represents the asynchronous get operation. The task result contains the partial metadata of the vanity invite found within this guild; null if none is found.

    | Improve this Doc View Source

    GetVoiceChannelAsync(UInt64, CacheMode, RequestOptions)

    Gets a voice channel in this guild.

    Declaration
    Task<IVoiceChannel> GetVoiceChannelAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 id

    The snowflake identifier for the voice channel.

    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IVoiceChannel>

    A task that represents the asynchronous get operation. The task result contains the voice channel associated with the specified id; null if none is found.

    | Improve this Doc View Source

    GetVoiceChannelsAsync(CacheMode, RequestOptions)

    Gets a collection of all voice channels in this guild.

    Declaration
    Task<IReadOnlyCollection<IVoiceChannel>> GetVoiceChannelsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<IVoiceChannel>>

    A task that represents the asynchronous get operation. The task result contains a read-only collection of voice channels found within this guild.

    | Improve this Doc View Source

    GetVoiceRegionsAsync(RequestOptions)

    Gets a collection of all the voice regions this guild can access.

    Declaration
    Task<IReadOnlyCollection<IVoiceRegion>> GetVoiceRegionsAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<IVoiceRegion>>

    A task that represents the asynchronous get operation. The task result contains a read-only collection of voice regions the guild can access.

    | Improve this Doc View Source

    GetWebhookAsync(UInt64, RequestOptions)

    Gets a webhook found within this guild.

    Declaration
    Task<IWebhook> GetWebhookAsync(ulong id, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 id

    The identifier for the webhook.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IWebhook>

    A task that represents the asynchronous get operation. The task result contains the webhook with the specified id; null if none is found.

    | Improve this Doc View Source

    GetWebhooksAsync(RequestOptions)

    Gets a collection of all webhook from this guild.

    Declaration
    Task<IReadOnlyCollection<IWebhook>> GetWebhooksAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<IWebhook>>

    A task that represents the asynchronous get operation. The task result contains a read-only collection of webhooks found within the guild.

    | Improve this Doc View Source

    GetWidgetChannelAsync(CacheMode, RequestOptions)

    Gets the widget channel (i.e. the channel set in the guild's widget settings) in this guild.

    Declaration
    Task<IGuildChannel> GetWidgetChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IGuildChannel>

    A task that represents the asynchronous get operation. The task result contains the widget channel set within the server's widget settings; null if none is set.

    | Improve this Doc View Source

    LeaveAsync(RequestOptions)

    Leaves this guild.

    Declaration
    Task LeaveAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous leave operation.

    Remarks

    This method will make the currently logged-in user leave the guild.

    note

    If the user is the owner of this guild, use DeleteAsync(RequestOptions) instead.

    | Improve this Doc View Source

    ModifyAsync(Action<GuildProperties>, RequestOptions)

    Modifies this guild.

    Declaration
    Task ModifyAsync(Action<GuildProperties> func, RequestOptions options = null)
    Parameters
    Type Name Description
    Action<GuildProperties> func

    The delegate containing the properties to modify the guild with.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous modification operation.

    | Improve this Doc View Source

    ModifyEmoteAsync(GuildEmote, Action<EmoteProperties>, RequestOptions)

    Modifies an existing GuildEmote in this guild.

    Declaration
    Task<GuildEmote> ModifyEmoteAsync(GuildEmote emote, Action<EmoteProperties> func, RequestOptions options = null)
    Parameters
    Type Name Description
    GuildEmote emote

    The emote to be modified.

    Action<EmoteProperties> func

    The delegate containing the properties to modify the emote with.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<GuildEmote>

    A task that represents the asynchronous modification operation. The task result contains the modified emote.

    | Improve this Doc View Source

    ModifyWidgetAsync(Action<GuildWidgetProperties>, RequestOptions)

    Modifies this guild's widget.

    Declaration
    Task ModifyWidgetAsync(Action<GuildWidgetProperties> func, RequestOptions options = null)
    Parameters
    Type Name Description
    Action<GuildWidgetProperties> func

    The delegate containing the properties to modify the guild widget with.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous modification operation.

    | Improve this Doc View Source

    MoveAsync(IGuildUser, IVoiceChannel)

    Moves the user to the voice channel.

    Declaration
    Task MoveAsync(IGuildUser user, IVoiceChannel targetChannel)
    Parameters
    Type Name Description
    IGuildUser user

    The user to move.

    IVoiceChannel targetChannel

    the channel where the user gets moved to.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation for moving a user.

    | Improve this Doc View Source

    PruneUsersAsync(Int32, Boolean, RequestOptions, IEnumerable<UInt64>)

    Prunes inactive users.

    Declaration
    Task<int> PruneUsersAsync(int days = 30, bool simulate = false, RequestOptions options = null, IEnumerable<ulong> includeRoleIds = null)
    Parameters
    Type Name Description
    Int32 days

    The number of days required for the users to be kicked.

    Boolean simulate

    Whether this prune action is a simulation.

    RequestOptions options

    The options to be used when sending the request.

    IEnumerable<UInt64> includeRoleIds

    An array of role IDs to be included in the prune of users who do not have any additional roles.

    Returns
    Type Description
    Task<Int32>

    A task that represents the asynchronous prune operation. The task result contains the number of users to be or has been removed from this guild.

    Remarks

    This method removes all users that have not logged on in the provided number of days.

    If simulate is true, this method will only return the number of users that would be removed without kicking the users.

    | Improve this Doc View Source

    RemoveBanAsync(IUser, RequestOptions)

    Unbans the user if they are currently banned.

    Declaration
    Task RemoveBanAsync(IUser user, RequestOptions options = null)
    Parameters
    Type Name Description
    IUser user

    The user to be unbanned.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous removal operation for the ban.

    | Improve this Doc View Source

    RemoveBanAsync(UInt64, RequestOptions)

    Unbans the user if they are currently banned.

    Declaration
    Task RemoveBanAsync(ulong userId, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 userId

    The snowflake identifier of the user to be unbanned.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous removal operation for the ban.

    | Improve this Doc View Source

    ReorderChannelsAsync(IEnumerable<ReorderChannelProperties>, RequestOptions)

    Bulk-modifies the order of channels in this guild.

    Declaration
    Task ReorderChannelsAsync(IEnumerable<ReorderChannelProperties> args, RequestOptions options = null)
    Parameters
    Type Name Description
    IEnumerable<ReorderChannelProperties> args

    The properties used to modify the channel positions with.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous reorder operation.

    | Improve this Doc View Source

    ReorderRolesAsync(IEnumerable<ReorderRoleProperties>, RequestOptions)

    Bulk-modifies the order of roles in this guild.

    Declaration
    Task ReorderRolesAsync(IEnumerable<ReorderRoleProperties> args, RequestOptions options = null)
    Parameters
    Type Name Description
    IEnumerable<ReorderRoleProperties> args

    The properties used to modify the role positions with.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous reorder operation.

    | Improve this Doc View Source

    SearchUsersAsync(String, Int32, CacheMode, RequestOptions)

    Gets a collection of users in this guild that the name or nickname starts with the provided at query.

    Declaration
    Task<IReadOnlyCollection<IGuildUser>> SearchUsersAsync(string query, int limit = null, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
    Parameters
    Type Name Description
    String query

    The partial name or nickname to search.

    Int32 limit

    The maximum number of users to be gotten.

    CacheMode mode

    The CacheMode that determines whether the object should be fetched from cache.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task<IReadOnlyCollection<IGuildUser>>

    A task that represents the asynchronous get operation. The task result contains a collection of guild users that the name or nickname starts with the provided at query.

    Remarks

    The limit can not be higher than MaxUsersPerBatch.

    Extension Methods

    GuildExtensions.GetWelcomeMessagesEnabled(IGuild)
    GuildExtensions.GetGuildBoostMessagesEnabled(IGuild)
    GuildExtensions.GetGuildSetupTipMessagesEnabled(IGuild)
    GuildExtensions.GetGuildWelcomeMessageReplyEnabled(IGuild)

    Theme

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