Interface IGuild
Represents a generic guild/server.
Assembly: Discord.Net.Core.dll​
View Source​
public interface IGuild : IDeletable, ISnowflakeEntity, IEntity<ulong>
Properties​
Name​
Gets the name of this guild.
View Source​
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​
int AFKTimeout { get; }
IsWidgetEnabled​
Gets a value that indicates whether this guild has the widget enabled.
View Source​
bool IsWidgetEnabled { get; }
DefaultMessageNotifications​
Gets the default message notifications for users who haven't explicitly set their notification settings.
View Source​
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​
MfaLevel MfaLevel { get; }
VerificationLevel​
Gets the level of requirements a user must fulfill before being allowed to post messages in this guild.
View Source​
VerificationLevel VerificationLevel { get; }
ExplicitContentFilter​
Gets the level of content filtering applied to user's content in a Guild.
View Source​
ExplicitContentFilterLevel ExplicitContentFilter { get; }
IconId​
Gets the ID of this guild's icon.
View Source​
string IconId { get; }
IconUrl​
Gets the URL of this guild's icon.
View Source​
string IconUrl { get; }
SplashId​
Gets the ID of this guild's splash image.
View Source​
string SplashId { get; }
SplashUrl​
Gets the URL of this guild's splash image.
View Source​
string SplashUrl { get; }
DiscoverySplashId​
Gets the ID of this guild's discovery splash image.
View Source​
string DiscoverySplashId { get; }
DiscoverySplashUrl​
Gets the URL of this guild's discovery splash image.
View Source​
string DiscoverySplashUrl { get; }
Available​
Determines if this guild is currently connected and ready to be used.
View Source​
bool Available { get; }
AFKChannelId​
Gets the ID of the AFK voice channel for this guild.
View Source​
ulong? AFKChannelId { get; }
WidgetChannelId​
Gets the ID of the channel assigned to the widget of this guild.
View Source​
ulong? WidgetChannelId { get; }
SystemChannelId​
Gets the ID of the channel where randomized welcome messages are sent.
View Source​
ulong? SystemChannelId { get; }
RulesChannelId​
Gets the ID of the channel with the rules.
View Source​
ulong? RulesChannelId { get; }
PublicUpdatesChannelId​
Gets the ID of the channel where admins and moderators of Community guilds receive notices from Discord.
View Source​
ulong? PublicUpdatesChannelId { get; }
OwnerId​
Gets the ID of the user that owns this guild.
View Source​
ulong OwnerId { get; }
ApplicationId​
Gets the application ID of the guild creator if it is bot-created.
View Source​
ulong? ApplicationId { get; }
VoiceRegionId​
Gets the ID of the region hosting this guild's voice channels.
View Source​
string VoiceRegionId { get; }
AudioClient​
Gets the Discord.Audio.IAudioClient currently associated with this guild.
View Source​
IAudioClient AudioClient { get; }
EveryoneRole​
Gets the built-in role containing all users in this guild.
View Source​
IRole EveryoneRole { get; }
Emotes​
Gets a collection of all custom emotes for this guild.
View Source​
IReadOnlyCollection<GuildEmote> Emotes { get; }
Stickers​
Gets a collection of all custom stickers for this guild.
View Source​
IReadOnlyCollection<ICustomSticker> Stickers { get; }
Features​
Gets the features for this guild.
View Source​
GuildFeatures Features { get; }
Roles​
Gets a collection of all roles in this guild.
View Source​
IReadOnlyCollection<IRole> Roles { get; }
PremiumTier​
Gets the tier of guild boosting in this guild.
View Source​
PremiumTier PremiumTier { get; }
BannerId​
Gets the identifier for this guilds banner image.
View Source​
string BannerId { get; }
BannerUrl​
Gets the URL of this guild's banner image.
View Source​
string BannerUrl { get; }
VanityURLCode​
Gets the code for this guild's vanity invite URL.
View Source​
string VanityURLCode { get; }
SystemChannelFlags​
Gets the flags for the types of system channel messages that are disabled.
View Source​
SystemChannelMessageDeny SystemChannelFlags { get; }
Description​
Gets the description for the guild.
View Source​
string Description { get; }
PremiumSubscriptionCount​
Gets the number of premium subscribers of this guild.
View Source​
int PremiumSubscriptionCount { get; }
MaxPresences​
Gets the maximum number of presences for the guild.
View Source​
int? MaxPresences { get; }
MaxMembers​
Gets the maximum number of members for the guild.
View Source​
int? MaxMembers { get; }
MaxVideoChannelUsers​
Gets the maximum amount of users in a video channel.
View Source​
int? MaxVideoChannelUsers { get; }
ApproximateMemberCount​
Gets the approximate number of members in this guild.
View Source​
int? ApproximateMemberCount { get; }
ApproximatePresenceCount​
Gets the approximate number of non-offline members in this guild.
View Source​
int? ApproximatePresenceCount { get; }
MaxBitrate​
Gets the max bitrate for voice channels in this guild.
View Source​
int MaxBitrate { get; }
PreferredLocale​
Gets the preferred locale of this guild in IETF BCP 47 language tag format.
View Source​
string PreferredLocale { get; }
NsfwLevel​
Gets the NSFW level of this guild.
View Source​
NsfwLevel NsfwLevel { get; }
PreferredCulture​
Gets the preferred culture of this guild.
View Source​
CultureInfo PreferredCulture { get; }
IsBoostProgressBarEnabled​
Gets whether the guild has the boost progress bar enabled.
View Source​
bool IsBoostProgressBarEnabled { get; }
Methods​
ModifyAsync(Action<GuildProperties>, RequestOptions)​
Modifies this guild.
View Source​
Task ModifyAsync(Action<GuildProperties> func, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous modification operation.
Parameters​
Type | Name | Description |
---|---|---|
System.Action<Discord.GuildProperties> | func | The delegate containing the properties to modify the guild with. |
Discord.RequestOptions | options | The options to be used when sending the request. |
ModifyWidgetAsync(Action<GuildWidgetProperties>, RequestOptions)​
Modifies this guild's widget.
View Source​
Task ModifyWidgetAsync(Action<GuildWidgetProperties> func, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous modification operation.
Parameters​
Type | Name | Description |
---|---|---|
System.Action<Discord.GuildWidgetProperties> | func | The delegate containing the properties to modify the guild widget with. |
Discord.RequestOptions | options | The options to be used when sending the request. |
ReorderChannelsAsync(IEnumerable<ReorderChannelProperties>, RequestOptions)​
Bulk-modifies the order of channels in this guild.
View Source​
Task ReorderChannelsAsync(IEnumerable<ReorderChannelProperties> args, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous reorder operation.
Parameters​
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<Discord.ReorderChannelProperties> | args | The properties used to modify the channel positions with. |
Discord.RequestOptions | options | The options to be used when sending the request. |
ReorderRolesAsync(IEnumerable<ReorderRoleProperties>, RequestOptions)​
Bulk-modifies the order of roles in this guild.
View Source​
Task ReorderRolesAsync(IEnumerable<ReorderRoleProperties> args, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous reorder operation.
Parameters​
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<Discord.ReorderRoleProperties> | args | The properties used to modify the role positions with. |
Discord.RequestOptions | options | The options to be used when sending the request. |
LeaveAsync(RequestOptions)​
Leaves this guild.
View Source​
Task LeaveAsync(RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous leave operation.
Parameters​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
GetBansAsync(RequestOptions)​
Gets a collection of all users banned in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
GetBanAsync(IUser, RequestOptions)​
Gets a ban object for a banned user.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.IUser | user | The banned user. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetBanAsync(UInt64, RequestOptions)​
Gets a ban object for a banned user.
View Source​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | userId | The snowflake identifier for the banned user. |
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
Discord.IUser | user | The user to ban. |
System.Int32 | pruneDays | The number of days to remove messages from this user for, and this number must be between [0, 7]. |
System.String | reason | The reason of the ban to be written in the audit log. |
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | userId | The snowflake ID of the user to ban. |
System.Int32 | pruneDays | The number of days to remove messages from this user for, and this number must be between [0, 7]. |
System.String | reason | The reason of the ban to be written in the audit log. |
Discord.RequestOptions | options | The options to be used when sending the request. |
RemoveBanAsync(IUser, RequestOptions)​
Unbans the user if they are currently banned.
View Source​
Task RemoveBanAsync(IUser user, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous removal operation for the ban.
Parameters​
Type | Name | Description |
---|---|---|
Discord.IUser | user | The user to be unbanned. |
Discord.RequestOptions | options | The options to be used when sending the request. |
RemoveBanAsync(UInt64, RequestOptions)​
Unbans the user if they are currently banned.
View Source​
Task RemoveBanAsync(ulong userId, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous removal operation for the ban.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | userId | The snowflake identifier of the user to be unbanned. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetChannelsAsync(CacheMode, RequestOptions)​
Gets a collection of all channels in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetChannelAsync(UInt64, CacheMode, RequestOptions)​
Gets a channel in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | id | The snowflake identifier for the channel. |
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetTextChannelsAsync(CacheMode, RequestOptions)​
Gets a collection of all text channels in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetTextChannelAsync(UInt64, CacheMode, RequestOptions)​
Gets a text channel in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | id | The snowflake identifier for the text channel. |
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetVoiceChannelsAsync(CacheMode, RequestOptions)​
Gets a collection of all voice channels in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetCategoriesAsync(CacheMode, RequestOptions)​
Gets a collection of all category channels in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetVoiceChannelAsync(UInt64, CacheMode, RequestOptions)​
Gets a voice channel in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | id | The snowflake identifier for the voice channel. |
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetStageChannelAsync(UInt64, CacheMode, RequestOptions)​
Gets a stage channel in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | id | The snowflake identifier for the stage channel. |
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetStageChannelsAsync(CacheMode, RequestOptions)​
Gets a collection of all stage channels in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetAFKChannelAsync(CacheMode, RequestOptions)​
Gets the AFK voice channel in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetDefaultChannelAsync(CacheMode, RequestOptions)​
Gets the first viewable text channel in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetThreadChannelAsync(UInt64, CacheMode, RequestOptions)​
Gets a thread channel within this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | id | The id of the thread channel. |
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetThreadChannelsAsync(CacheMode, RequestOptions)​
Gets a collection of all thread channels in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
CreateTextChannelAsync(String, Action<TextChannelProperties>, RequestOptions)​
Creates a new text channel in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.String | name | The new name for the text channel. |
System.Action<Discord.TextChannelProperties> | func | The delegate containing the properties to be applied to the channel upon its creation. |
Discord.RequestOptions | options | The options to be used when sending the request. |
CreateVoiceChannelAsync(String, Action<VoiceChannelProperties>, RequestOptions)​
Creates a new voice channel in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.String | name | The new name for the voice channel. |
System.Action<Discord.VoiceChannelProperties> | func | The delegate containing the properties to be applied to the channel upon its creation. |
Discord.RequestOptions | options | The options to be used when sending the request. |
CreateStageChannelAsync(String, Action<VoiceChannelProperties>, RequestOptions)​
Creates a new stage channel in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.String | name | The new name for the stage channel. |
System.Action<Discord.VoiceChannelProperties> | func | The delegate containing the properties to be applied to the channel upon its creation. |
Discord.RequestOptions | options | The options to be used when sending the request. |
CreateCategoryAsync(String, Action<GuildChannelProperties>, RequestOptions)​
Creates a new channel category in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.String | name | The new name for the category. |
System.Action<Discord.GuildChannelProperties> | func | The delegate containing the properties to be applied to the channel upon its creation. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetVoiceRegionsAsync(RequestOptions)​
Gets a collection of all the voice regions this guild can access.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
GetIntegrationsAsync(RequestOptions)​
View Source​
Task<IReadOnlyCollection<IGuildIntegration>> GetIntegrationsAsync(RequestOptions options = null)
Returns​
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.IGuildIntegration>>
Parameters​
Type | Name |
---|---|
Discord.RequestOptions | options |
CreateIntegrationAsync(UInt64, String, RequestOptions)​
View Source​
Task<IGuildIntegration> CreateIntegrationAsync(ulong id, string type, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task<Discord.IGuildIntegration>
Parameters​
Type | Name |
---|---|
System.UInt64 | id |
System.String | type |
Discord.RequestOptions | options |
GetInvitesAsync(RequestOptions)​
Gets a collection of all invites in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
GetVanityInviteAsync(RequestOptions)​
Gets the vanity invite URL of this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
GetRole(UInt64)​
Gets a role in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | id | The snowflake identifier for the role. |
CreateRoleAsync(String, Nullable<GuildPermissions>, Nullable<Color>, Boolean, RequestOptions)​
Creates a new role with the provided name.
View Source​
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​
Type | Name | Description |
---|---|---|
System.String | name | The new name for the role. |
System.Nullable<Discord.GuildPermissions> | permissions | The guild permission that the role should possess. |
System.Nullable<Discord.Color> | color | The color of the role. |
System.Boolean | isHoisted | Whether the role is separated from others on the sidebar. |
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
System.String | name | The new name for the role. |
System.Nullable<Discord.GuildPermissions> | permissions | The guild permission that the role should possess. |
System.Nullable<Discord.Color> | color | The color of the role. |
System.Boolean | isHoisted | Whether the role is separated from others on the sidebar. |
System.Boolean | isMentionable | Whether the role can be mentioned. |
Discord.RequestOptions | options | The options to be used when sending the request. |
AddGuildUserAsync(UInt64, String, Action<AddGuildUserProperties>, RequestOptions)​
Adds a user to this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | userId | The snowflake identifier of the user. |
System.String | accessToken | The OAuth2 access token for the user, requested with the guilds.join scope. |
System.Action<Discord.AddGuildUserProperties> | func | The delegate containing the properties to be applied to the user upon being added to the guild. |
Discord.RequestOptions | options | The options to be used when sending the request. |
DisconnectAsync(IGuildUser)​
Disconnects the user from its current voice channel.
View Source​
Task DisconnectAsync(IGuildUser user)
Returns​
System.Threading.Tasks.Task
: A task that represents the asynchronous operation for disconnecting a user.
Parameters​
Type | Name | Description |
---|---|---|
Discord.IGuildUser | user | The user to disconnect. |
GetUsersAsync(CacheMode, RequestOptions)​
Gets a collection of all users in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetUserAsync(UInt64, CacheMode, RequestOptions)​
Gets a user from this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | id | The snowflake identifier of the user. |
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetCurrentUserAsync(CacheMode, RequestOptions)​
Gets the current user for this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetOwnerAsync(CacheMode, RequestOptions)​
Gets the owner of this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
DownloadUsersAsync()​
Downloads all users for this guild if the current list is incomplete.
View Source​
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​
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​
Type | Name | Description |
---|---|---|
System.Int32 | days | The number of days required for the users to be kicked. |
System.Boolean | simulate | Whether this prune action is a simulation. |
Discord.RequestOptions | options | The options to be used when sending the request. |
System.Collections.Generic.IEnumerable<System.UInt64> | includeRoleIds | An 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​
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​
Type | Name | Description |
---|---|---|
System.String | query | The partial name or nickname to search. |
System.Int32 | limit | The maximum number of users to be gotten. |
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
System.Int32 | limit | The number of audit log entries to fetch. |
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
System.Nullable<System.UInt64> | beforeId | The audit log entry ID to get entries before. |
System.Nullable<System.UInt64> | userId | The user ID to filter entries for. |
System.Nullable<Discord.ActionType> | actionType | The type of actions to filter. |
GetWebhookAsync(UInt64, RequestOptions)​
Gets a webhook found within this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | id | The identifier for the webhook. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetWebhooksAsync(RequestOptions)​
Gets a collection of all webhook from this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
GetEmotesAsync(RequestOptions)​
Gets a collection of emotes from this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
GetEmoteAsync(UInt64, RequestOptions)​
Gets a specific emote from this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | id | The snowflake identifier for the guild emote. |
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
System.String | name | The name of the guild emote. |
Discord.Image | image | The image of the new emote. |
Discord.Optional<T> | roles | The roles to limit the emote usage to. |
Discord.RequestOptions | options | The options to be used when sending the request. |
ModifyEmoteAsync(GuildEmote, Action<EmoteProperties>, RequestOptions)​
Modifies an existing Discord.GuildEmote in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.GuildEmote | emote | The emote to be modified. |
System.Action<Discord.EmoteProperties> | func | The delegate containing the properties to modify the emote with. |
Discord.RequestOptions | options | The options to be used when sending the request. |
MoveAsync(IGuildUser, IVoiceChannel)​
Moves the user to the voice channel.
View Source​
Task MoveAsync(IGuildUser user, IVoiceChannel targetChannel)
Returns​
System.Threading.Tasks.Task
: A task that represents the asynchronous operation for moving a user.
Parameters​
Type | Name | Description |
---|---|---|
Discord.IGuildUser | user | The user to move. |
Discord.IVoiceChannel | targetChannel | the channel where the user gets moved to. |
DeleteEmoteAsync(GuildEmote, RequestOptions)​
Deletes an existing Discord.GuildEmote from this guild.
View Source​
Task DeleteEmoteAsync(GuildEmote emote, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous removal operation.
Parameters​
Type | Name | Description |
---|---|---|
Discord.GuildEmote | emote | The emote to delete. |
Discord.RequestOptions | options | The options to be used when sending the request. |
CreateStickerAsync(String, String, IEnumerable<String>, Image, RequestOptions)​
Creates a new sticker in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.String | name | The name of the sticker. |
System.String | description | The description of the sticker. |
System.Collections.Generic.IEnumerable<System.String> | tags | The tags of the sticker. |
Discord.Image | image | The image of the new emote. |
Discord.RequestOptions | options | The options to be used when sending the request. |
CreateStickerAsync(String, String, IEnumerable<String>, String, RequestOptions)​
Creates a new sticker in this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.String | name | The name of the sticker. |
System.String | description | The description of the sticker. |
System.Collections.Generic.IEnumerable<System.String> | tags | The tags of the sticker. |
System.String | path | The path of the file to upload. |
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
System.String | name | The name of the sticker. |
System.String | description | The description of the sticker. |
System.Collections.Generic.IEnumerable<System.String> | tags | The tags of the sticker. |
System.IO.Stream | stream | The stream containing the file data. |
System.String | filename | The name of the file <strong>with</strong> the extension, ex: image.png. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetStickerAsync(UInt64, CacheMode, RequestOptions)​
Gets a specific sticker within this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | id | The id of the sticker to get. |
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetStickersAsync(CacheMode, RequestOptions)​
Gets a collection of all stickers within this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
DeleteStickerAsync(ICustomSticker, RequestOptions)​
Deletes a sticker within this guild.
View Source​
Task DeleteStickerAsync(ICustomSticker sticker, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous removal operation.
Parameters​
Type | Name | Description |
---|---|---|
Discord.ICustomSticker | sticker | The sticker to delete. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetEventAsync(UInt64, RequestOptions)​
Gets a event within this guild.
View Source​
Task<IGuildScheduledEvent> GetEventAsync(ulong id, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task<Discord.IGuildScheduledEvent>
:
A task that represents the asynchronous get operation.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | id | The id of the event. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetEventsAsync(RequestOptions)​
Gets a collection of events within this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
System.String | name | The name of the event. |
System.DateTimeOffset | startTime | The start time of the event. |
Discord.GuildScheduledEventType | type | The type of the event. |
Discord.GuildScheduledEventPrivacyLevel | privacyLevel | The privacy level of the event. |
System.String | description | The description of the event. |
System.Nullable<System.DateTimeOffset> | endTime | The 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​
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​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | id | The id of the application command to get. |
Discord.CacheMode | mode | The Discord.CacheMode that determines whether the object should be fetched from cache. |
Discord.RequestOptions | options | The options to be used when sending the request. |
CreateApplicationCommandAsync(ApplicationCommandProperties, RequestOptions)​
Creates an application command within this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.ApplicationCommandProperties | properties | The properties to use when creating the command. |
Discord.RequestOptions | options | The options to be used when sending the request. |
BulkOverwriteApplicationCommandsAsync(ApplicationCommandProperties[], RequestOptions)​
Overwrites the application commands within this guild.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.ApplicationCommandProperties[] | properties | A collection of properties to use when creating the commands. |
Discord.RequestOptions | options | The options to be used when sending the request. |