Skip to main content

Interface IGuild

Represents a generic guild/server.

Assembly: Discord.Net.Core.dll​
View Source​
Declaration
public interface IGuild : IDeletable, ISnowflakeEntity, IEntity<ulong>

Properties​

Name​

Gets the name of this guild.

View Source​
Declaration
string Name { get; }

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.

View Source​
Declaration
int AFKTimeout { get; }

IsWidgetEnabled​

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

View Source​
Declaration
bool IsWidgetEnabled { get; }

DefaultMessageNotifications​

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

View Source​
Declaration
DefaultMessageNotifications DefaultMessageNotifications { get; }

MfaLevel​

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

View Source​
Declaration
MfaLevel MfaLevel { get; }

VerificationLevel​

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

View Source​
Declaration
VerificationLevel VerificationLevel { get; }

ExplicitContentFilter​

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

View Source​
Declaration
ExplicitContentFilterLevel ExplicitContentFilter { get; }

IconId​

Gets the ID of this guild's icon.

View Source​
Declaration
string IconId { get; }

IconUrl​

Gets the URL of this guild's icon.

View Source​
Declaration
string IconUrl { get; }

SplashId​

Gets the ID of this guild's splash image.

View Source​
Declaration
string SplashId { get; }

SplashUrl​

Gets the URL of this guild's splash image.

View Source​
Declaration
string SplashUrl { get; }

DiscoverySplashId​

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

View Source​
Declaration
string DiscoverySplashId { get; }

DiscoverySplashUrl​

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

View Source​
Declaration
string DiscoverySplashUrl { get; }

Available​

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

View Source​
Declaration
bool Available { get; }

AFKChannelId​

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

View Source​
Declaration
ulong? AFKChannelId { get; }

WidgetChannelId​

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

View Source​
Declaration
ulong? WidgetChannelId { get; }

SystemChannelId​

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

View Source​
Declaration
ulong? SystemChannelId { get; }

RulesChannelId​

Gets the ID of the channel with the rules.

View Source​
Declaration
ulong? RulesChannelId { get; }

PublicUpdatesChannelId​

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

View Source​
Declaration
ulong? PublicUpdatesChannelId { get; }

OwnerId​

Gets the ID of the user that owns this guild.

View Source​
Declaration
ulong OwnerId { get; }

ApplicationId​

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

View Source​
Declaration
ulong? ApplicationId { get; }

VoiceRegionId​

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

View Source​
Declaration
string VoiceRegionId { get; }

AudioClient​

Gets the Discord.Audio.IAudioClient currently associated with this guild.

View Source​
Declaration
IAudioClient AudioClient { get; }

EveryoneRole​

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

View Source​
Declaration
IRole EveryoneRole { get; }

Emotes​

Gets a collection of all custom emotes for this guild.

View Source​
Declaration
IReadOnlyCollection<GuildEmote> Emotes { get; }

Stickers​

Gets a collection of all custom stickers for this guild.

View Source​
Declaration
IReadOnlyCollection<ICustomSticker> Stickers { get; }

Features​

Gets the features for this guild.

View Source​
Declaration
GuildFeatures Features { get; }

Roles​

Gets a collection of all roles in this guild.

View Source​
Declaration
IReadOnlyCollection<IRole> Roles { get; }

PremiumTier​

Gets the tier of guild boosting in this guild.

View Source​
Declaration
PremiumTier PremiumTier { get; }

BannerId​

Gets the identifier for this guilds banner image.

View Source​
Declaration
string BannerId { get; }

BannerUrl​

Gets the URL of this guild's banner image.

View Source​
Declaration
string BannerUrl { get; }

VanityURLCode​

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

View Source​
Declaration
string VanityURLCode { get; }

SystemChannelFlags​

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

View Source​
Declaration
SystemChannelMessageDeny SystemChannelFlags { get; }

Description​

Gets the description for the guild.

View Source​
Declaration
string Description { get; }

PremiumSubscriptionCount​

Gets the number of premium subscribers of this guild.

View Source​
Declaration
int PremiumSubscriptionCount { get; }

MaxPresences​

Gets the maximum number of presences for the guild.

View Source​
Declaration
int? MaxPresences { get; }

MaxMembers​

Gets the maximum number of members for the guild.

View Source​
Declaration
int? MaxMembers { get; }

MaxVideoChannelUsers​

Gets the maximum amount of users in a video channel.

View Source​
Declaration
int? MaxVideoChannelUsers { get; }

ApproximateMemberCount​

Gets the approximate number of members in this guild.

View Source​
Declaration
int? ApproximateMemberCount { get; }

ApproximatePresenceCount​

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

View Source​
Declaration
int? ApproximatePresenceCount { get; }

MaxBitrate​

Gets the max bitrate for voice channels in this guild.

View Source​
Declaration
int MaxBitrate { get; }

PreferredLocale​

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

View Source​
Declaration
string PreferredLocale { get; }

NsfwLevel​

Gets the NSFW level of this guild.

View Source​
Declaration
NsfwLevel NsfwLevel { get; }

PreferredCulture​

Gets the preferred culture of this guild.

View Source​
Declaration
CultureInfo PreferredCulture { get; }

IsBoostProgressBarEnabled​

Gets whether the guild has the boost progress bar enabled.

View Source​
Declaration
bool IsBoostProgressBarEnabled { get; }

Methods​

ModifyAsync(Action<GuildProperties>, RequestOptions)​

Modifies this guild.

View Source​
Declaration
Task ModifyAsync(Action<GuildProperties> func, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous modification operation.

Parameters​
TypeNameDescription
System.Action<Discord.GuildProperties>funcThe delegate containing the properties to modify the guild with.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

ModifyWidgetAsync(Action<GuildWidgetProperties>, RequestOptions)​

Modifies this guild's widget.

View Source​
Declaration
Task ModifyWidgetAsync(Action<GuildWidgetProperties> func, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous modification operation.

Parameters​
TypeNameDescription
System.Action<Discord.GuildWidgetProperties>funcThe delegate containing the properties to modify the guild widget with.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

ReorderChannelsAsync(IEnumerable<ReorderChannelProperties>, RequestOptions)​

Bulk-modifies the order of channels in this guild.

View Source​
Declaration
Task ReorderChannelsAsync(IEnumerable<ReorderChannelProperties> args, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous reorder operation.

Parameters​
TypeNameDescription
System.Collections.Generic.IEnumerable<Discord.ReorderChannelProperties>argsThe properties used to modify the channel positions with.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

ReorderRolesAsync(IEnumerable<ReorderRoleProperties>, RequestOptions)​

Bulk-modifies the order of roles in this guild.

View Source​
Declaration
Task ReorderRolesAsync(IEnumerable<ReorderRoleProperties> args, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous reorder operation.

Parameters​
TypeNameDescription
System.Collections.Generic.IEnumerable<Discord.ReorderRoleProperties>argsThe properties used to modify the role positions with.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

LeaveAsync(RequestOptions)​

Leaves this guild.

View Source​
Declaration
Task LeaveAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous leave operation.

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetBansAsync(RequestOptions)​

Gets a collection of all users banned in this guild.

View Source​
Declaration
Task<IReadOnlyCollection<IBan>> GetBansAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.IBan>>: A task that represents the asynchronous get operation. The task result contains a read-only collection of ban objects that this guild currently possesses, with each object containing the user banned and reason behind the ban.

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetBanAsync(IUser, RequestOptions)​

Gets a ban object for a banned user.

View Source​
Declaration
Task<IBan> GetBanAsync(IUser user, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.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.

Parameters​
TypeNameDescription
Discord.IUseruserThe banned user.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetBanAsync(UInt64, RequestOptions)​

Gets a ban object for a banned user.

View Source​
Declaration
Task<IBan> GetBanAsync(ulong userId, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.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.

Parameters​
TypeNameDescription
System.UInt64userIdThe snowflake identifier for the banned user.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

AddBanAsync(IUser, Int32, String, RequestOptions)​

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

View Source​
Declaration
Task AddBanAsync(IUser user, int pruneDays = 0, string reason = null, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous add operation for the ban.

Parameters​
TypeNameDescription
Discord.IUseruserThe user to ban.
System.Int32pruneDaysThe number of days to remove messages from this user for, and this number must be between [0, 7].
System.StringreasonThe reason of the ban to be written in the audit log.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

AddBanAsync(UInt64, Int32, String, RequestOptions)​

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

View Source​
Declaration
Task AddBanAsync(ulong userId, int pruneDays = 0, string reason = null, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous add operation for the ban.

Parameters​
TypeNameDescription
System.UInt64userIdThe snowflake ID of the user to ban.
System.Int32pruneDaysThe number of days to remove messages from this user for, and this number must be between [0, 7].
System.StringreasonThe reason of the ban to be written in the audit log.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

RemoveBanAsync(IUser, RequestOptions)​

Unbans the user if they are currently banned.

View Source​
Declaration
Task RemoveBanAsync(IUser user, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous removal operation for the ban.

Parameters​
TypeNameDescription
Discord.IUseruserThe user to be unbanned.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

RemoveBanAsync(UInt64, RequestOptions)​

Unbans the user if they are currently banned.

View Source​
Declaration
Task RemoveBanAsync(ulong userId, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous removal operation for the ban.

Parameters​
TypeNameDescription
System.UInt64userIdThe snowflake identifier of the user to be unbanned.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetChannelsAsync(CacheMode, RequestOptions)​

Gets a collection of all channels in this guild.

View Source​
Declaration
Task<IReadOnlyCollection<IGuildChannel>> GetChannelsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.IGuildChannel>>: A task that represents the asynchronous get operation. The task result contains a read-only collection of generic channels found within this guild.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetChannelAsync(UInt64, CacheMode, RequestOptions)​

Gets a channel in this guild.

View Source​
Declaration
Task<IGuildChannel> GetChannelAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IGuildChannel>: A task that represents the asynchronous get operation. The task result contains the generic channel associated with the specified <code data-dev-comment-type="paramref" class="paramref">id</code>; null if none is found.

Parameters​
TypeNameDescription
System.UInt64idThe snowflake identifier for the channel.
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetTextChannelsAsync(CacheMode, RequestOptions)​

Gets a collection of all text channels in this guild.

View Source​
Declaration
Task<IReadOnlyCollection<ITextChannel>> GetTextChannelsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.ITextChannel>>: A task that represents the asynchronous get operation. The task result contains a read-only collection of message channels found within this guild.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetTextChannelAsync(UInt64, CacheMode, RequestOptions)​

Gets a text channel in this guild.

View Source​
Declaration
Task<ITextChannel> GetTextChannelAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.ITextChannel>: A task that represents the asynchronous get operation. The task result contains the text channel associated with the specified <code data-dev-comment-type="paramref" class="paramref">id</code>; null if none is found.

Parameters​
TypeNameDescription
System.UInt64idThe snowflake identifier for the text channel.
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetVoiceChannelsAsync(CacheMode, RequestOptions)​

Gets a collection of all voice channels in this guild.

View Source​
Declaration
Task<IReadOnlyCollection<IVoiceChannel>> GetVoiceChannelsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.IVoiceChannel>>: A task that represents the asynchronous get operation. The task result contains a read-only collection of voice channels found within this guild.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetCategoriesAsync(CacheMode, RequestOptions)​

Gets a collection of all category channels in this guild.

View Source​
Declaration
Task<IReadOnlyCollection<ICategoryChannel>> GetCategoriesAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.ICategoryChannel>>: A task that represents the asynchronous get operation. The task result contains a read-only collection of category channels found within this guild.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetVoiceChannelAsync(UInt64, CacheMode, RequestOptions)​

Gets a voice channel in this guild.

View Source​
Declaration
Task<IVoiceChannel> GetVoiceChannelAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IVoiceChannel>: A task that represents the asynchronous get operation. The task result contains the voice channel associated with the specified <code data-dev-comment-type="paramref" class="paramref">id</code>; null if none is found.

Parameters​
TypeNameDescription
System.UInt64idThe snowflake identifier for the voice channel.
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetStageChannelAsync(UInt64, CacheMode, RequestOptions)​

Gets a stage channel in this guild.

View Source​
Declaration
Task<IStageChannel> GetStageChannelAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IStageChannel>: A task that represents the asynchronous get operation. The task result contains the stage channel associated with the specified <code data-dev-comment-type="paramref" class="paramref">id</code>; null if none is found.

Parameters​
TypeNameDescription
System.UInt64idThe snowflake identifier for the stage channel.
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetStageChannelsAsync(CacheMode, RequestOptions)​

Gets a collection of all stage channels in this guild.

View Source​
Declaration
Task<IReadOnlyCollection<IStageChannel>> GetStageChannelsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.IStageChannel>>: A task that represents the asynchronous get operation. The task result contains a read-only collection of stage channels found within this guild.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetAFKChannelAsync(CacheMode, RequestOptions)​

Gets the AFK voice channel in this guild.

View Source​
Declaration
Task<IVoiceChannel> GetAFKChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.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.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetSystemChannelAsync(CacheMode, RequestOptions)​

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

View Source​
Declaration
Task<ITextChannel> GetSystemChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.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.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetDefaultChannelAsync(CacheMode, RequestOptions)​

Gets the first viewable text channel in this guild.

View Source​
Declaration
Task<ITextChannel> GetDefaultChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.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.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetWidgetChannelAsync(CacheMode, RequestOptions)​

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

View Source​
Declaration
Task<IGuildChannel> GetWidgetChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.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.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetRulesChannelAsync(CacheMode, RequestOptions)​

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

View Source​
Declaration
Task<ITextChannel> GetRulesChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.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.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetPublicUpdatesChannelAsync(CacheMode, RequestOptions)​

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

View Source​
Declaration
Task<ITextChannel> GetPublicUpdatesChannelAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.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.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetThreadChannelAsync(UInt64, CacheMode, RequestOptions)​

Gets a thread channel within this guild.

View Source​
Declaration
Task<IThreadChannel> GetThreadChannelAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IThreadChannel>: A task that represents the asynchronous get operation. The task result contains the thread channel.

Parameters​
TypeNameDescription
System.UInt64idThe id of the thread channel.
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetThreadChannelsAsync(CacheMode, RequestOptions)​

Gets a collection of all thread channels in this guild.

View Source​
Declaration
Task<IReadOnlyCollection<IThreadChannel>> GetThreadChannelsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.IThreadChannel>>: A task that represents the asynchronous get operation. The task result contains a read-only collection of thread channels found within this guild.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

CreateTextChannelAsync(String, Action<TextChannelProperties>, RequestOptions)​

Creates a new text channel in this guild.

View Source​
Declaration
Task<ITextChannel> CreateTextChannelAsync(string name, Action<TextChannelProperties> func = null, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.ITextChannel>: A task that represents the asynchronous creation operation. The task result contains the newly created text channel.

Parameters​
TypeNameDescription
System.StringnameThe new name for the text channel.
System.Action<Discord.TextChannelProperties>funcThe delegate containing the properties to be applied to the channel upon its creation.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

CreateVoiceChannelAsync(String, Action<VoiceChannelProperties>, RequestOptions)​

Creates a new voice channel in this guild.

View Source​
Declaration
Task<IVoiceChannel> CreateVoiceChannelAsync(string name, Action<VoiceChannelProperties> func = null, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IVoiceChannel>: A task that represents the asynchronous creation operation. The task result contains the newly created voice channel.

Parameters​
TypeNameDescription
System.StringnameThe new name for the voice channel.
System.Action<Discord.VoiceChannelProperties>funcThe delegate containing the properties to be applied to the channel upon its creation.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

CreateStageChannelAsync(String, Action<VoiceChannelProperties>, RequestOptions)​

Creates a new stage channel in this guild.

View Source​
Declaration
Task<IStageChannel> CreateStageChannelAsync(string name, Action<VoiceChannelProperties> func = null, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IStageChannel>: A task that represents the asynchronous creation operation. The task result contains the newly created stage channel.

Parameters​
TypeNameDescription
System.StringnameThe new name for the stage channel.
System.Action<Discord.VoiceChannelProperties>funcThe delegate containing the properties to be applied to the channel upon its creation.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

CreateCategoryAsync(String, Action<GuildChannelProperties>, RequestOptions)​

Creates a new channel category in this guild.

View Source​
Declaration
Task<ICategoryChannel> CreateCategoryAsync(string name, Action<GuildChannelProperties> func = null, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.ICategoryChannel>: A task that represents the asynchronous creation operation. The task result contains the newly created category channel.

Parameters​
TypeNameDescription
System.StringnameThe new name for the category.
System.Action<Discord.GuildChannelProperties>funcThe delegate containing the properties to be applied to the channel upon its creation.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetVoiceRegionsAsync(RequestOptions)​

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

View Source​
Declaration
Task<IReadOnlyCollection<IVoiceRegion>> GetVoiceRegionsAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.IVoiceRegion>>: A task that represents the asynchronous get operation. The task result contains a read-only collection of voice regions the guild can access.

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetIntegrationsAsync(RequestOptions)​

View Source​
Declaration
Task<IReadOnlyCollection<IGuildIntegration>> GetIntegrationsAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.IGuildIntegration>>

Parameters​
TypeName
Discord.RequestOptionsoptions

CreateIntegrationAsync(UInt64, String, RequestOptions)​

View Source​
Declaration
Task<IGuildIntegration> CreateIntegrationAsync(ulong id, string type, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IGuildIntegration>

Parameters​
TypeName
System.UInt64id
System.Stringtype
Discord.RequestOptionsoptions

GetInvitesAsync(RequestOptions)​

Gets a collection of all invites in this guild.

View Source​
Declaration
Task<IReadOnlyCollection<IInviteMetadata>> GetInvitesAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.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.

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetVanityInviteAsync(RequestOptions)​

Gets the vanity invite URL of this guild.

View Source​
Declaration
Task<IInviteMetadata> GetVanityInviteAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.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.

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetRole(UInt64)​

Gets a role in this guild.

View Source​
Declaration
IRole GetRole(ulong id)
Returns​

Discord.IRole: A role that is associated with the specified <code data-dev-comment-type="paramref" class="paramref">id</code>; null if none is found.

Parameters​
TypeNameDescription
System.UInt64idThe snowflake identifier for the role.

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

Creates a new role with the provided name.

View Source​
Declaration
Task<IRole> CreateRoleAsync(string name, GuildPermissions? permissions = null, Color? color = null, bool isHoisted = false, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IRole>: A task that represents the asynchronous creation operation. The task result contains the newly created role.

Parameters​
TypeNameDescription
System.StringnameThe new name for the role.
System.Nullable<Discord.GuildPermissions>permissionsThe guild permission that the role should possess.
System.Nullable<Discord.Color>colorThe color of the role.
System.BooleanisHoistedWhether the role is separated from others on the sidebar.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

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

Creates a new role with the provided name.

View Source​
Declaration
Task<IRole> CreateRoleAsync(string name, GuildPermissions? permissions = null, Color? color = null, bool isHoisted = false, bool isMentionable = false, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IRole>: A task that represents the asynchronous creation operation. The task result contains the newly created role.

Parameters​
TypeNameDescription
System.StringnameThe new name for the role.
System.Nullable<Discord.GuildPermissions>permissionsThe guild permission that the role should possess.
System.Nullable<Discord.Color>colorThe color of the role.
System.BooleanisHoistedWhether the role is separated from others on the sidebar.
System.BooleanisMentionableWhether the role can be mentioned.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

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

Adds a user to this guild.

View Source​
Declaration
Task<IGuildUser> AddGuildUserAsync(ulong userId, string accessToken, Action<AddGuildUserProperties> func = null, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IGuildUser>: A guild user associated with the specified <code data-dev-comment-type="paramref" class="paramref">userId</code>; null if the user is already in the guild.

Parameters​
TypeNameDescription
System.UInt64userIdThe snowflake identifier of the user.
System.StringaccessTokenThe OAuth2 access token for the user, requested with the guilds.join scope.
System.Action<Discord.AddGuildUserProperties>funcThe delegate containing the properties to be applied to the user upon being added to the guild.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

DisconnectAsync(IGuildUser)​

Disconnects the user from its current voice channel.

View Source​
Declaration
Task DisconnectAsync(IGuildUser user)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous operation for disconnecting a user.

Parameters​
TypeNameDescription
Discord.IGuildUseruserThe user to disconnect.

GetUsersAsync(CacheMode, RequestOptions)​

Gets a collection of all users in this guild.

View Source​
Declaration
Task<IReadOnlyCollection<IGuildUser>> GetUsersAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.IGuildUser>>: A task that represents the asynchronous get operation. The task result contains a collection of guild users found within this guild.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetUserAsync(UInt64, CacheMode, RequestOptions)​

Gets a user from this guild.

View Source​
Declaration
Task<IGuildUser> GetUserAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IGuildUser>: A task that represents the asynchronous get operation. The task result contains the guild user associated with the specified <code data-dev-comment-type="paramref" class="paramref">id</code>; null if none is found.

Parameters​
TypeNameDescription
System.UInt64idThe snowflake identifier of the user.
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetCurrentUserAsync(CacheMode, RequestOptions)​

Gets the current user for this guild.

View Source​
Declaration
Task<IGuildUser> GetCurrentUserAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IGuildUser>: A task that represents the asynchronous get operation. The task result contains the currently logged-in user within this guild.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetOwnerAsync(CacheMode, RequestOptions)​

Gets the owner of this guild.

View Source​
Declaration
Task<IGuildUser> GetOwnerAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IGuildUser>: A task that represents the asynchronous get operation. The task result contains the owner of this guild.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

DownloadUsersAsync()​

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

View Source​
Declaration
Task DownloadUsersAsync()
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous download operation.

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

Prunes inactive users.

View Source​
Declaration
Task<int> PruneUsersAsync(int days = 30, bool simulate = false, RequestOptions options = null, IEnumerable<ulong> includeRoleIds = null)
Returns​

System.Threading.Tasks.Task<System.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.

Parameters​
TypeNameDescription
System.Int32daysThe number of days required for the users to be kicked.
System.BooleansimulateWhether this prune action is a simulation.
Discord.RequestOptionsoptionsThe options to be used when sending the request.
System.Collections.Generic.IEnumerable<System.UInt64>includeRoleIdsAn array of role IDs to be included in the prune of users who do not have any additional roles.

SearchUsersAsync(String, Int32, CacheMode, RequestOptions)​

Gets a collection of users in this guild that the name or nickname starts with the provided System.String at <code data-dev-comment-type="paramref" class="paramref">query</code>.

View Source​
Declaration
Task<IReadOnlyCollection<IGuildUser>> SearchUsersAsync(string query, int limit = 1000, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.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 System.String at <code data-dev-comment-type="paramref" class="paramref">query</code>.

Parameters​
TypeNameDescription
System.StringqueryThe partial name or nickname to search.
System.Int32limitThe maximum number of users to be gotten.
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

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

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

View Source​
Declaration
Task<IReadOnlyCollection<IAuditLogEntry>> GetAuditLogsAsync(int limit = 100, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null, ulong? beforeId = null, ulong? userId = null, ActionType? actionType = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.IAuditLogEntry>>: A task that represents the asynchronous get operation. The task result contains a read-only collection of the requested audit log entries.

Parameters​
TypeNameDescription
System.Int32limitThe number of audit log entries to fetch.
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.
System.Nullable<System.UInt64>beforeIdThe audit log entry ID to get entries before.
System.Nullable<System.UInt64>userIdThe user ID to filter entries for.
System.Nullable<Discord.ActionType>actionTypeThe type of actions to filter.

GetWebhookAsync(UInt64, RequestOptions)​

Gets a webhook found within this guild.

View Source​
Declaration
Task<IWebhook> GetWebhookAsync(ulong id, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IWebhook>: A task that represents the asynchronous get operation. The task result contains the webhook with the specified <code data-dev-comment-type="paramref" class="paramref">id</code>; null if none is found.

Parameters​
TypeNameDescription
System.UInt64idThe identifier for the webhook.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetWebhooksAsync(RequestOptions)​

Gets a collection of all webhook from this guild.

View Source​
Declaration
Task<IReadOnlyCollection<IWebhook>> GetWebhooksAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.IWebhook>>: A task that represents the asynchronous get operation. The task result contains a read-only collection of webhooks found within the guild.

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetEmotesAsync(RequestOptions)​

Gets a collection of emotes from this guild.

View Source​
Declaration
Task<IReadOnlyCollection<GuildEmote>> GetEmotesAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.GuildEmote>>: A task that represents the asynchronous get operation. The task result contains a read-only collection of emotes found within the guild.

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetEmoteAsync(UInt64, RequestOptions)​

Gets a specific emote from this guild.

View Source​
Declaration
Task<GuildEmote> GetEmoteAsync(ulong id, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.GuildEmote>: A task that represents the asynchronous get operation. The task result contains the emote found with the specified <code data-dev-comment-type="paramref" class="paramref">id</code>; null if none is found.

Parameters​
TypeNameDescription
System.UInt64idThe snowflake identifier for the guild emote.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

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

Creates a new Discord.GuildEmote in this guild.

View Source​
Declaration
Task<GuildEmote> CreateEmoteAsync(string name, Image image, Optional<IEnumerable<IRole>> roles = default(Optional<IEnumerable<IRole>>), RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.GuildEmote>: A task that represents the asynchronous creation operation. The task result contains the created emote.

Parameters​
TypeNameDescription
System.StringnameThe name of the guild emote.
Discord.ImageimageThe image of the new emote.
Discord.Optional<T>rolesThe roles to limit the emote usage to.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

ModifyEmoteAsync(GuildEmote, Action<EmoteProperties>, RequestOptions)​

Modifies an existing Discord.GuildEmote in this guild.

View Source​
Declaration
Task<GuildEmote> ModifyEmoteAsync(GuildEmote emote, Action<EmoteProperties> func, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.GuildEmote>: A task that represents the asynchronous modification operation. The task result contains the modified emote.

Parameters​
TypeNameDescription
Discord.GuildEmoteemoteThe emote to be modified.
System.Action<Discord.EmoteProperties>funcThe delegate containing the properties to modify the emote with.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

MoveAsync(IGuildUser, IVoiceChannel)​

Moves the user to the voice channel.

View Source​
Declaration
Task MoveAsync(IGuildUser user, IVoiceChannel targetChannel)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous operation for moving a user.

Parameters​
TypeNameDescription
Discord.IGuildUseruserThe user to move.
Discord.IVoiceChanneltargetChannelthe channel where the user gets moved to.

DeleteEmoteAsync(GuildEmote, RequestOptions)​

Deletes an existing Discord.GuildEmote from this guild.

View Source​
Declaration
Task DeleteEmoteAsync(GuildEmote emote, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous removal operation.

Parameters​
TypeNameDescription
Discord.GuildEmoteemoteThe emote to delete.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

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

Creates a new sticker in this guild.

View Source​
Declaration
Task<ICustomSticker> CreateStickerAsync(string name, string description, IEnumerable<string> tags, Image image, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.ICustomSticker>: A task that represents the asynchronous creation operation. The task result contains the created sticker.

Parameters​
TypeNameDescription
System.StringnameThe name of the sticker.
System.StringdescriptionThe description of the sticker.
System.Collections.Generic.IEnumerable<System.String>tagsThe tags of the sticker.
Discord.ImageimageThe image of the new emote.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

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

Creates a new sticker in this guild.

View Source​
Declaration
Task<ICustomSticker> CreateStickerAsync(string name, string description, IEnumerable<string> tags, string path, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.ICustomSticker>: A task that represents the asynchronous creation operation. The task result contains the created sticker.

Parameters​
TypeNameDescription
System.StringnameThe name of the sticker.
System.StringdescriptionThe description of the sticker.
System.Collections.Generic.IEnumerable<System.String>tagsThe tags of the sticker.
System.StringpathThe path of the file to upload.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

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

Creates a new sticker in this guild.

View Source​
Declaration
Task<ICustomSticker> CreateStickerAsync(string name, string description, IEnumerable<string> tags, Stream stream, string filename, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.ICustomSticker>: A task that represents the asynchronous creation operation. The task result contains the created sticker.

Parameters​
TypeNameDescription
System.StringnameThe name of the sticker.
System.StringdescriptionThe description of the sticker.
System.Collections.Generic.IEnumerable<System.String>tagsThe tags of the sticker.
System.IO.StreamstreamThe stream containing the file data.
System.StringfilenameThe name of the file <strong>with</strong> the extension, ex: image.png.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetStickerAsync(UInt64, CacheMode, RequestOptions)​

Gets a specific sticker within this guild.

View Source​
Declaration
Task<ICustomSticker> GetStickerAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.ICustomSticker>: A task that represents the asynchronous get operation. The task result contains the sticker found with the specified <code data-dev-comment-type="paramref" class="paramref">id</code>; null if none is found.

Parameters​
TypeNameDescription
System.UInt64idThe id of the sticker to get.
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetStickersAsync(CacheMode, RequestOptions)​

Gets a collection of all stickers within this guild.

View Source​
Declaration
Task<IReadOnlyCollection<ICustomSticker>> GetStickersAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.ICustomSticker>>: A task that represents the asynchronous get operation. The task result contains a read-only collection of stickers found within the guild.

Parameters​
TypeNameDescription
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

DeleteStickerAsync(ICustomSticker, RequestOptions)​

Deletes a sticker within this guild.

View Source​
Declaration
Task DeleteStickerAsync(ICustomSticker sticker, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous removal operation.

Parameters​
TypeNameDescription
Discord.ICustomStickerstickerThe sticker to delete.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetEventAsync(UInt64, RequestOptions)​

Gets a event within this guild.

View Source​
Declaration
Task<IGuildScheduledEvent> GetEventAsync(ulong id, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IGuildScheduledEvent>: A task that represents the asynchronous get operation.

Parameters​
TypeNameDescription
System.UInt64idThe id of the event.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetEventsAsync(RequestOptions)​

Gets a collection of events within this guild.

View Source​
Declaration
Task<IReadOnlyCollection<IGuildScheduledEvent>> GetEventsAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.IGuildScheduledEvent>>: A task that represents the asynchronous get operation.

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.

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

Creates an event within this guild.

View Source​
Declaration
Task<IGuildScheduledEvent> CreateEventAsync(string name, DateTimeOffset startTime, GuildScheduledEventType type, GuildScheduledEventPrivacyLevel privacyLevel = GuildScheduledEventPrivacyLevel.Private, string description = null, DateTimeOffset? endTime = null, ulong? channelId = null, string location = null, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IGuildScheduledEvent>: A task that represents the asynchronous create operation.

Parameters​
TypeNameDescription
System.StringnameThe name of the event.
System.DateTimeOffsetstartTimeThe start time of the event.
Discord.GuildScheduledEventTypetypeThe type of the event.
Discord.GuildScheduledEventPrivacyLevelprivacyLevelThe privacy level of the event.
System.StringdescriptionThe description of the event.
System.Nullable<System.DateTimeOffset>endTimeThe end time of the event.
System.Nullable<System.UInt64>channelId

The channel id of the event. <remarks> The event must have a type of Discord.GuildScheduledEventType.Stage or Discord.GuildScheduledEventType.Voice in order to use this property. </remarks> | | System.String | location | The location of the event; links are supported | | Discord.RequestOptions | options | The options to be used when sending the request. |

GetApplicationCommandsAsync(RequestOptions)​

Gets this guilds application commands.

View Source​
Declaration
Task<IReadOnlyCollection<IApplicationCommand>> GetApplicationCommandsAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.IApplicationCommand>>: A task that represents the asynchronous get operation. The task result contains a read-only collection of application commands found within the guild.

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetApplicationCommandAsync(UInt64, CacheMode, RequestOptions)​

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

View Source​
Declaration
Task<IApplicationCommand> GetApplicationCommandAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IApplicationCommand>: A ValueTask that represents the asynchronous get operation. The task result contains a Discord.IApplicationCommand if found, otherwise null.

Parameters​
TypeNameDescription
System.UInt64idThe id of the application command to get.
Discord.CacheModemodeThe Discord.CacheMode that determines whether the object should be fetched from cache.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

CreateApplicationCommandAsync(ApplicationCommandProperties, RequestOptions)​

Creates an application command within this guild.

View Source​
Declaration
Task<IApplicationCommand> CreateApplicationCommandAsync(ApplicationCommandProperties properties, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<Discord.IApplicationCommand>: A task that represents the asynchronous creation operation. The task result contains the command that was created.

Parameters​
TypeNameDescription
Discord.ApplicationCommandPropertiespropertiesThe properties to use when creating the command.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

BulkOverwriteApplicationCommandsAsync(ApplicationCommandProperties[], RequestOptions)​

Overwrites the application commands within this guild.

View Source​
Declaration
Task<IReadOnlyCollection<IApplicationCommand>> BulkOverwriteApplicationCommandsAsync(ApplicationCommandProperties[] properties, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.IApplicationCommand>>: A task that represents the asynchronous creation operation. The task result contains a collection of commands that was created.

Parameters​
TypeNameDescription
Discord.ApplicationCommandProperties[]propertiesA collection of properties to use when creating the commands.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

Extension Methods​