Table of Contents

Class RestClient

Namespace
NetCord.Rest
Assembly
NetCord.dll
public sealed class RestClient : IDisposable
Inheritance
RestClient
Implements
Inherited Members

Constructors

RestClient(IToken, RestClientConfiguration?)

public RestClient(IToken token, RestClientConfiguration? configuration = null)

Parameters

token IToken
configuration RestClientConfiguration

RestClient(RestClientConfiguration?)

public RestClient(RestClientConfiguration? configuration = null)

Parameters

configuration RestClientConfiguration

Properties

Token

The token of the RestClient.

public IToken? Token { get; }

Property Value

IToken

Methods

AddGuildThreadUserAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task AddGuildThreadUserAsync(ulong threadId, ulong userId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

threadId ulong
userId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

AddGuildUserAsync(ulong, ulong, GuildUserProperties, RestRequestProperties?, CancellationToken)

public Task<GuildUser?> AddGuildUserAsync(ulong guildId, ulong userId, GuildUserProperties userProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
userId ulong
userProperties GuildUserProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildUser>

AddGuildUserRoleAsync(ulong, ulong, ulong, RestRequestProperties?, CancellationToken)

public Task AddGuildUserRoleAsync(ulong guildId, ulong userId, ulong roleId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
userId ulong
roleId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

AddMessageReactionAsync(ulong, ulong, ReactionEmojiProperties, RestRequestProperties?, CancellationToken)

public Task AddMessageReactionAsync(ulong channelId, ulong messageId, ReactionEmojiProperties emoji, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
messageId ulong
emoji ReactionEmojiProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

BanGuildUserAsync(ulong, ulong, int, RestRequestProperties?, CancellationToken)

public Task BanGuildUserAsync(ulong guildId, ulong userId, int deleteMessageSeconds = 0, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
userId ulong
deleteMessageSeconds int
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

BanGuildUsersAsync(ulong, IEnumerable<ulong>, int, RestRequestProperties?, CancellationToken)

public Task<GuildBulkBan> BanGuildUsersAsync(ulong guildId, IEnumerable<ulong> userIds, int deleteMessageSeconds = 0, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
userIds IEnumerable<ulong>
deleteMessageSeconds int
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildBulkBan>

BulkOverwriteGlobalApplicationCommandsAsync(ulong, IEnumerable<ApplicationCommandProperties>, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<ApplicationCommand>> BulkOverwriteGlobalApplicationCommandsAsync(ulong applicationId, IEnumerable<ApplicationCommandProperties> commands, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
commands IEnumerable<ApplicationCommandProperties>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<ApplicationCommand>>

BulkOverwriteGuildApplicationCommandsAsync(ulong, ulong, IEnumerable<ApplicationCommandProperties>, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<GuildApplicationCommand>> BulkOverwriteGuildApplicationCommandsAsync(ulong applicationId, ulong guildId, IEnumerable<ApplicationCommandProperties> commands, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
guildId ulong
commands IEnumerable<ApplicationCommandProperties>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<GuildApplicationCommand>>

ConsumeEntitlementAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task ConsumeEntitlementAsync(ulong applicationId, ulong entitlementId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
entitlementId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

CreateApplicationEmojiAsync(ulong, ApplicationEmojiProperties, RestRequestProperties?, CancellationToken)

public Task<ApplicationEmoji> CreateApplicationEmojiAsync(ulong applicationId, ApplicationEmojiProperties applicationEmojiProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
applicationEmojiProperties ApplicationEmojiProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<ApplicationEmoji>

CreateAutoModerationRuleAsync(ulong, AutoModerationRuleProperties, RestRequestProperties?, CancellationToken)

public Task<AutoModerationRule> CreateAutoModerationRuleAsync(ulong guildId, AutoModerationRuleProperties autoModerationRuleProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
autoModerationRuleProperties AutoModerationRuleProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<AutoModerationRule>

CreateForumGuildThreadAsync(ulong, ForumGuildThreadProperties, RestRequestProperties?, CancellationToken)

public Task<ForumGuildThread> CreateForumGuildThreadAsync(ulong channelId, ForumGuildThreadProperties threadProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
threadProperties ForumGuildThreadProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<ForumGuildThread>

CreateGlobalApplicationCommandAsync(ulong, ApplicationCommandProperties, RestRequestProperties?, CancellationToken)

public Task<ApplicationCommand> CreateGlobalApplicationCommandAsync(ulong applicationId, ApplicationCommandProperties applicationCommandProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
applicationCommandProperties ApplicationCommandProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<ApplicationCommand>

CreateGoogleCloudPlatformStorageBucketsAsync(ulong, IEnumerable<GoogleCloudPlatformStorageBucketProperties>, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<GoogleCloudPlatformStorageBucket>> CreateGoogleCloudPlatformStorageBucketsAsync(ulong channelId, IEnumerable<GoogleCloudPlatformStorageBucketProperties> buckets, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
buckets IEnumerable<GoogleCloudPlatformStorageBucketProperties>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<GoogleCloudPlatformStorageBucket>>

CreateGroupDMChannelAsync(GroupDMChannelProperties, RestRequestProperties?, CancellationToken)

public Task<GroupDMChannel> CreateGroupDMChannelAsync(GroupDMChannelProperties groupDMChannelProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

groupDMChannelProperties GroupDMChannelProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GroupDMChannel>

CreateGuildApplicationCommandAsync(ulong, ulong, ApplicationCommandProperties, RestRequestProperties?, CancellationToken)

public Task<GuildApplicationCommand> CreateGuildApplicationCommandAsync(ulong applicationId, ulong guildId, ApplicationCommandProperties applicationCommandProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
guildId ulong
applicationCommandProperties ApplicationCommandProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildApplicationCommand>

CreateGuildAsync(GuildProperties, RestRequestProperties?, CancellationToken)

public Task<RestGuild> CreateGuildAsync(GuildProperties guildProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildProperties GuildProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestGuild>

CreateGuildChannelAsync(ulong, GuildChannelProperties, RestRequestProperties?, CancellationToken)

public Task<IGuildChannel> CreateGuildChannelAsync(ulong guildId, GuildChannelProperties channelProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
channelProperties GuildChannelProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IGuildChannel>

CreateGuildChannelInviteAsync(ulong, InviteProperties?, RestRequestProperties?, CancellationToken)

public Task<RestInvite> CreateGuildChannelInviteAsync(ulong channelId, InviteProperties? inviteProperties = null, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
inviteProperties InviteProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestInvite>

CreateGuildEmojiAsync(ulong, GuildEmojiProperties, RestRequestProperties?, CancellationToken)

public Task<GuildEmoji> CreateGuildEmojiAsync(ulong guildId, GuildEmojiProperties guildEmojiProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
guildEmojiProperties GuildEmojiProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildEmoji>

CreateGuildFromGuildTemplateAsync(string, GuildFromGuildTemplateProperties, RestRequestProperties?, CancellationToken)

public Task<RestGuild> CreateGuildFromGuildTemplateAsync(string templateCode, GuildFromGuildTemplateProperties guildProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

templateCode string
guildProperties GuildFromGuildTemplateProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestGuild>

CreateGuildRoleAsync(ulong, RoleProperties, RestRequestProperties?, CancellationToken)

public Task<Role> CreateGuildRoleAsync(ulong guildId, RoleProperties guildRoleProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
guildRoleProperties RoleProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Role>

CreateGuildScheduledEventAsync(ulong, GuildScheduledEventProperties, RestRequestProperties?, CancellationToken)

public Task<GuildScheduledEvent> CreateGuildScheduledEventAsync(ulong guildId, GuildScheduledEventProperties guildScheduledEventProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
guildScheduledEventProperties GuildScheduledEventProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildScheduledEvent>

CreateGuildStickerAsync(ulong, GuildStickerProperties, RestRequestProperties?, CancellationToken)

public Task<GuildSticker> CreateGuildStickerAsync(ulong guildId, GuildStickerProperties sticker, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
sticker GuildStickerProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildSticker>

CreateGuildTemplateAsync(ulong, GuildTemplateProperties, RestRequestProperties?, CancellationToken)

public Task<GuildTemplate> CreateGuildTemplateAsync(ulong guildId, GuildTemplateProperties guildTemplateProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
guildTemplateProperties GuildTemplateProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildTemplate>

CreateGuildThreadAsync(ulong, GuildThreadProperties, RestRequestProperties?, CancellationToken)

public Task<GuildThread> CreateGuildThreadAsync(ulong channelId, GuildThreadProperties threadProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
threadProperties GuildThreadProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildThread>

CreateGuildThreadAsync(ulong, ulong, GuildThreadFromMessageProperties, RestRequestProperties?, CancellationToken)

public Task<GuildThread> CreateGuildThreadAsync(ulong channelId, ulong messageId, GuildThreadFromMessageProperties threadFromMessageProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
messageId ulong
threadFromMessageProperties GuildThreadFromMessageProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildThread>

CreateStageInstanceAsync(StageInstanceProperties, RestRequestProperties?, CancellationToken)

public Task<StageInstance> CreateStageInstanceAsync(StageInstanceProperties stageInstanceProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

stageInstanceProperties StageInstanceProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<StageInstance>

CreateTestEntitlementAsync(ulong, TestEntitlementProperties, RestRequestProperties?, CancellationToken)

public Task<Entitlement> CreateTestEntitlementAsync(ulong applicationId, TestEntitlementProperties testEntitlementProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
testEntitlementProperties TestEntitlementProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Entitlement>

CreateWebhookAsync(ulong, WebhookProperties, RestRequestProperties?, CancellationToken)

public Task<Webhook> CreateWebhookAsync(ulong channelId, WebhookProperties webhookProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
webhookProperties WebhookProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Webhook>

CrosspostMessageAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<RestMessage> CrosspostMessageAsync(ulong channelId, ulong messageId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
messageId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

DeleteAllMessageReactionsAsync(ulong, ulong, ReactionEmojiProperties, RestRequestProperties?, CancellationToken)

public Task DeleteAllMessageReactionsAsync(ulong channelId, ulong messageId, ReactionEmojiProperties emoji, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
messageId ulong
emoji ReactionEmojiProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteAllMessageReactionsAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteAllMessageReactionsAsync(ulong channelId, ulong messageId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
messageId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteApplicationEmojiAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteApplicationEmojiAsync(ulong applicationId, ulong emojiId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
emojiId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteAutoModerationRuleAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteAutoModerationRuleAsync(ulong guildId, ulong autoModerationRuleId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
autoModerationRuleId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteChannelAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<Channel> DeleteChannelAsync(ulong channelId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Channel>

DeleteGlobalApplicationCommandAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteGlobalApplicationCommandAsync(ulong applicationId, ulong commandId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
commandId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteGuildApplicationCommandAsync(ulong, ulong, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteGuildApplicationCommandAsync(ulong applicationId, ulong guildId, ulong commandId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
guildId ulong
commandId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteGuildAsync(ulong, RestRequestProperties?, CancellationToken)

public Task DeleteGuildAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteGuildChannelPermissionAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteGuildChannelPermissionAsync(ulong channelId, ulong overwriteId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
overwriteId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteGuildEmojiAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteGuildEmojiAsync(ulong guildId, ulong emojiId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
emojiId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteGuildIntegrationAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteGuildIntegrationAsync(ulong guildId, ulong integrationId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
integrationId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteGuildInviteAsync(string, RestRequestProperties?, CancellationToken)

public Task<RestInvite> DeleteGuildInviteAsync(string inviteCode, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

inviteCode string
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestInvite>

DeleteGuildRoleAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteGuildRoleAsync(ulong guildId, ulong roleId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
roleId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteGuildScheduledEventAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteGuildScheduledEventAsync(ulong guildId, ulong scheduledEventId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
scheduledEventId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteGuildStickerAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteGuildStickerAsync(ulong guildId, ulong stickerId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
stickerId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteGuildTemplateAsync(ulong, string, RestRequestProperties?, CancellationToken)

public Task<GuildTemplate> DeleteGuildTemplateAsync(ulong guildId, string templateCode, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
templateCode string
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildTemplate>

DeleteGuildThreadUserAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteGuildThreadUserAsync(ulong threadId, ulong userId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

threadId ulong
userId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteInteractionFollowupMessageAsync(ulong, string, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteInteractionFollowupMessageAsync(ulong applicationId, string interactionToken, ulong messageId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
interactionToken string
messageId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteInteractionResponseAsync(ulong, string, RestRequestProperties?, CancellationToken)

public Task DeleteInteractionResponseAsync(ulong applicationId, string interactionToken, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
interactionToken string
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteMessageAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteMessageAsync(ulong channelId, ulong messageId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
messageId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteMessageReactionAsync(ulong, ulong, ReactionEmojiProperties, RestRequestProperties?, CancellationToken)

public Task DeleteMessageReactionAsync(ulong channelId, ulong messageId, ReactionEmojiProperties emoji, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
messageId ulong
emoji ReactionEmojiProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteMessageReactionAsync(ulong, ulong, ReactionEmojiProperties, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteMessageReactionAsync(ulong channelId, ulong messageId, ReactionEmojiProperties emoji, ulong userId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
messageId ulong
emoji ReactionEmojiProperties
userId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteMessagesAsync(ulong, IAsyncEnumerable<ulong>, RestRequestProperties?, CancellationToken)

public Task DeleteMessagesAsync(ulong channelId, IAsyncEnumerable<ulong> messageIds, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
messageIds IAsyncEnumerable<ulong>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteMessagesAsync(ulong, IEnumerable<ulong>, RestRequestProperties?, CancellationToken)

public Task DeleteMessagesAsync(ulong channelId, IEnumerable<ulong> messageIds, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
messageIds IEnumerable<ulong>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteStageInstanceAsync(ulong, RestRequestProperties?, CancellationToken)

public Task DeleteStageInstanceAsync(ulong channelId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteTestEntitlementAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task DeleteTestEntitlementAsync(ulong applicationId, ulong entitlementId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
entitlementId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteWebhookAsync(ulong, RestRequestProperties?, CancellationToken)

public Task DeleteWebhookAsync(ulong webhookId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

webhookId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteWebhookMessageAsync(ulong, string, ulong, ulong?, RestRequestProperties?, CancellationToken)

public Task DeleteWebhookMessageAsync(ulong webhookId, string webhookToken, ulong messageId, ulong? threadId = null, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

webhookId ulong
webhookToken string
messageId ulong
threadId ulong?
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

DeleteWebhookWithTokenAsync(ulong, string, RestRequestProperties?, CancellationToken)

public Task DeleteWebhookWithTokenAsync(ulong webhookId, string webhookToken, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

webhookId ulong
webhookToken string
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

Dispose()

public void Dispose()

EndMessagePollAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<RestMessage> EndMessagePollAsync(ulong channelId, ulong messageId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
messageId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

EnterTypingStateAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IDisposable> EnterTypingStateAsync(ulong channelId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IDisposable>

ExecuteWebhookAsync(ulong, string, WebhookMessageProperties, bool, ulong?, RestRequestProperties?, CancellationToken)

public Task<RestMessage?> ExecuteWebhookAsync(ulong webhookId, string webhookToken, WebhookMessageProperties message, bool wait = false, ulong? threadId = null, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

webhookId ulong
webhookToken string
message WebhookMessageProperties
wait bool
threadId ulong?
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

FindGuildUserAsync(ulong, string, int, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<GuildUser>> FindGuildUserAsync(ulong guildId, string name, int limit, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
name string
limit int
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<GuildUser>>

FollowAnnouncementGuildChannelAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<FollowedChannel> FollowAnnouncementGuildChannelAsync(ulong channelId, ulong webhookChannelId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
webhookChannelId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<FollowedChannel>

GetActiveGuildThreadsAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<GuildThread>> GetActiveGuildThreadsAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<GuildThread>>

GetApplicationAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<Application> GetApplicationAsync(ulong applicationId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Application>

GetApplicationCommandGuildPermissionsAsync(ulong, ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<ApplicationCommandGuildPermissions> GetApplicationCommandGuildPermissionsAsync(ulong applicationId, ulong guildId, ulong commandId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
guildId ulong
commandId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<ApplicationCommandGuildPermissions>

GetApplicationCommandsGuildPermissionsAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<ApplicationCommandGuildPermissions>> GetApplicationCommandsGuildPermissionsAsync(ulong applicationId, ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<ApplicationCommandGuildPermissions>>

GetApplicationEmojiAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<ApplicationEmoji> GetApplicationEmojiAsync(ulong applicationId, ulong emojiId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
emojiId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<ApplicationEmoji>

GetApplicationEmojisAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<ApplicationEmoji>> GetApplicationEmojisAsync(ulong applicationId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<ApplicationEmoji>>

GetApplicationRoleConnectionMetadataRecordsAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<ApplicationRoleConnectionMetadata>> GetApplicationRoleConnectionMetadataRecordsAsync(ulong applicationId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<ApplicationRoleConnectionMetadata>>

GetAutoModerationRuleAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<AutoModerationRule> GetAutoModerationRuleAsync(ulong guildId, ulong autoModerationRuleId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
autoModerationRuleId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<AutoModerationRule>

GetAutoModerationRulesAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<AutoModerationRule>> GetAutoModerationRulesAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<AutoModerationRule>>

GetChannelAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<Channel> GetChannelAsync(ulong channelId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Channel>

GetChannelWebhooksAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<Webhook>> GetChannelWebhooksAsync(ulong channelId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<Webhook>>

GetCurrentApplicationAsync(RestRequestProperties?, CancellationToken)

public Task<CurrentApplication> GetCurrentApplicationAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<CurrentApplication>

GetCurrentAuthorizationInformationAsync(RestRequestProperties?, CancellationToken)

public Task<AuthorizationInformation> GetCurrentAuthorizationInformationAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<AuthorizationInformation>

GetCurrentBotApplicationInformationAsync(RestRequestProperties?, CancellationToken)

public Task<CurrentApplication> GetCurrentBotApplicationInformationAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<CurrentApplication>

GetCurrentGuildUserVoiceStateAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<VoiceState> GetCurrentGuildUserVoiceStateAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<VoiceState>

GetCurrentUserApplicationRoleConnectionAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<ApplicationRoleConnection> GetCurrentUserApplicationRoleConnectionAsync(ulong applicationId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<ApplicationRoleConnection>

GetCurrentUserAsync(RestRequestProperties?, CancellationToken)

public Task<CurrentUser> GetCurrentUserAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<CurrentUser>

GetCurrentUserConnectionsAsync(RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<Connection>> GetCurrentUserConnectionsAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<Connection>>

GetCurrentUserGuildUserAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<GuildUser> GetCurrentUserGuildUserAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildUser>

GetCurrentUserGuildsAsync(GuildsPaginationProperties?, RestRequestProperties?)

public IAsyncEnumerable<RestGuild> GetCurrentUserGuildsAsync(GuildsPaginationProperties? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

paginationProperties GuildsPaginationProperties
properties RestRequestProperties

Returns

IAsyncEnumerable<RestGuild>

GetDMChannelAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<DMChannel> GetDMChannelAsync(ulong userId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

userId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<DMChannel>

GetEntitlementsAsync(ulong, EntitlementsPaginationProperties?, RestRequestProperties?)

public IAsyncEnumerable<Entitlement> GetEntitlementsAsync(ulong applicationId, EntitlementsPaginationProperties? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

applicationId ulong
paginationProperties EntitlementsPaginationProperties
properties RestRequestProperties

Returns

IAsyncEnumerable<Entitlement>

GetGatewayAsync(RestRequestProperties?, CancellationToken)

public Task<string> GetGatewayAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<string>

GetGatewayBotAsync(RestRequestProperties?, CancellationToken)

public Task<GatewayBot> GetGatewayBotAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GatewayBot>

GetGlobalApplicationCommandAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<ApplicationCommand> GetGlobalApplicationCommandAsync(ulong applicationId, ulong commandId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
commandId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<ApplicationCommand>

GetGlobalApplicationCommandsAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<ApplicationCommand>> GetGlobalApplicationCommandsAsync(ulong applicationId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<ApplicationCommand>>

GetGuildApplicationCommandAsync(ulong, ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<GuildApplicationCommand> GetGuildApplicationCommandAsync(ulong applicationId, ulong guildId, ulong commandId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
guildId ulong
commandId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildApplicationCommand>

GetGuildApplicationCommandsAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<GuildApplicationCommand>> GetGuildApplicationCommandsAsync(ulong applicationId, ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<GuildApplicationCommand>>

GetGuildAsync(ulong, bool, RestRequestProperties?, CancellationToken)

public Task<RestGuild> GetGuildAsync(ulong guildId, bool withCounts = false, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
withCounts bool
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestGuild>

GetGuildAuditLogAsync(ulong, GuildAuditLogPaginationProperties?, RestRequestProperties?)

public IAsyncEnumerable<RestAuditLogEntry> GetGuildAuditLogAsync(ulong guildId, GuildAuditLogPaginationProperties? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

guildId ulong
paginationProperties GuildAuditLogPaginationProperties
properties RestRequestProperties

Returns

IAsyncEnumerable<RestAuditLogEntry>

GetGuildBanAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<GuildBan> GetGuildBanAsync(ulong guildId, ulong userId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
userId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildBan>

GetGuildBansAsync(ulong, PaginationProperties<ulong>?, RestRequestProperties?)

public IAsyncEnumerable<GuildBan> GetGuildBansAsync(ulong guildId, PaginationProperties<ulong>? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

guildId ulong
paginationProperties PaginationProperties<ulong>
properties RestRequestProperties

Returns

IAsyncEnumerable<GuildBan>

GetGuildChannelInvitesAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IEnumerable<RestInvite>> GetGuildChannelInvitesAsync(ulong channelId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IEnumerable<RestInvite>>

GetGuildChannelsAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<IGuildChannel>> GetGuildChannelsAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<IGuildChannel>>

GetGuildEmojiAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<GuildEmoji> GetGuildEmojiAsync(ulong guildId, ulong emojiId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
emojiId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildEmoji>

GetGuildEmojisAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<GuildEmoji>> GetGuildEmojisAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<GuildEmoji>>

GetGuildIntegrationsAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<Integration>> GetGuildIntegrationsAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<Integration>>

GetGuildInviteAsync(string, bool, bool, ulong?, RestRequestProperties?, CancellationToken)

public Task<RestInvite> GetGuildInviteAsync(string inviteCode, bool withCounts = false, bool withExpiration = false, ulong? guildScheduledEventId = null, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

inviteCode string
withCounts bool
withExpiration bool
guildScheduledEventId ulong?
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestInvite>

GetGuildInvitesAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IEnumerable<RestInvite>> GetGuildInvitesAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IEnumerable<RestInvite>>

GetGuildOnboardingAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<GuildOnboarding> GetGuildOnboardingAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildOnboarding>

GetGuildPreviewAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<GuildPreview> GetGuildPreviewAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildPreview>

GetGuildPruneCountAsync(ulong, int, IEnumerable<ulong>?, RestRequestProperties?, CancellationToken)

public Task<int> GetGuildPruneCountAsync(ulong guildId, int days, IEnumerable<ulong>? roles = null, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
days int
roles IEnumerable<ulong>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<int>

GetGuildRoleAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<Role> GetGuildRoleAsync(ulong guildId, ulong roleId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
roleId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Role>

GetGuildRolesAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<Role>> GetGuildRolesAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<Role>>

GetGuildScheduledEventAsync(ulong, ulong, bool, RestRequestProperties?, CancellationToken)

public Task<GuildScheduledEvent> GetGuildScheduledEventAsync(ulong guildId, ulong scheduledEventId, bool withUserCount = false, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
scheduledEventId ulong
withUserCount bool
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildScheduledEvent>

GetGuildScheduledEventUsersAsync(ulong, ulong, OptionalGuildUsersPaginationProperties?, RestRequestProperties?)

public IAsyncEnumerable<GuildScheduledEventUser> GetGuildScheduledEventUsersAsync(ulong guildId, ulong scheduledEventId, OptionalGuildUsersPaginationProperties? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

guildId ulong
scheduledEventId ulong
paginationProperties OptionalGuildUsersPaginationProperties
properties RestRequestProperties

Returns

IAsyncEnumerable<GuildScheduledEventUser>

GetGuildScheduledEventsAsync(ulong, bool, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<GuildScheduledEvent>> GetGuildScheduledEventsAsync(ulong guildId, bool withUserCount = false, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
withUserCount bool
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<GuildScheduledEvent>>

GetGuildStickerAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<GuildSticker> GetGuildStickerAsync(ulong guildId, ulong stickerId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
stickerId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildSticker>

GetGuildStickersAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<GuildSticker>> GetGuildStickersAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<GuildSticker>>

GetGuildTemplateAsync(string, RestRequestProperties?, CancellationToken)

public Task<GuildTemplate> GetGuildTemplateAsync(string templateCode, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

templateCode string
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildTemplate>

GetGuildTemplatesAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IEnumerable<GuildTemplate>> GetGuildTemplatesAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IEnumerable<GuildTemplate>>

GetGuildThreadUserAsync(ulong, ulong, bool, RestRequestProperties?, CancellationToken)

public Task<ThreadUser> GetGuildThreadUserAsync(ulong threadId, ulong userId, bool withGuildUser = false, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

threadId ulong
userId ulong
withGuildUser bool
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<ThreadUser>

GetGuildThreadUsersAsync(ulong, OptionalGuildUsersPaginationProperties?, RestRequestProperties?)

public IAsyncEnumerable<ThreadUser> GetGuildThreadUsersAsync(ulong threadId, OptionalGuildUsersPaginationProperties? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

threadId ulong
paginationProperties OptionalGuildUsersPaginationProperties
properties RestRequestProperties

Returns

IAsyncEnumerable<ThreadUser>

GetGuildUserAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<GuildUser> GetGuildUserAsync(ulong guildId, ulong userId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
userId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildUser>

GetGuildUserVoiceStateAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<VoiceState> GetGuildUserVoiceStateAsync(ulong guildId, ulong userId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
userId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<VoiceState>

GetGuildUsersAsync(ulong, PaginationProperties<ulong>?, RestRequestProperties?)

public IAsyncEnumerable<GuildUser> GetGuildUsersAsync(ulong guildId, PaginationProperties<ulong>? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

guildId ulong
paginationProperties PaginationProperties<ulong>
properties RestRequestProperties

Returns

IAsyncEnumerable<GuildUser>

GetGuildVanityInviteAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<GuildVanityInvite> GetGuildVanityInviteAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildVanityInvite>

GetGuildVoiceRegionsAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IEnumerable<VoiceRegion>> GetGuildVoiceRegionsAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IEnumerable<VoiceRegion>>

GetGuildWebhooksAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<Webhook>> GetGuildWebhooksAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<Webhook>>

GetGuildWelcomeScreenAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<GuildWelcomeScreen> GetGuildWelcomeScreenAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildWelcomeScreen>

GetGuildWidgetAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<GuildWidget> GetGuildWidgetAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildWidget>

GetGuildWidgetSettingsAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<GuildWidgetSettings> GetGuildWidgetSettingsAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildWidgetSettings>

GetInteractionFollowupMessageAsync(ulong, string, ulong, RestRequestProperties?, CancellationToken)

public Task<RestMessage> GetInteractionFollowupMessageAsync(ulong applicationId, string interactionToken, ulong messageId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
interactionToken string
messageId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

GetInteractionResponseAsync(ulong, string, RestRequestProperties?, CancellationToken)

public Task<RestMessage> GetInteractionResponseAsync(ulong applicationId, string interactionToken, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
interactionToken string
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

GetJoinedPrivateArchivedGuildThreadsAsync(ulong, PaginationProperties<ulong>?, RestRequestProperties?)

public IAsyncEnumerable<GuildThread> GetJoinedPrivateArchivedGuildThreadsAsync(ulong channelId, PaginationProperties<ulong>? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

channelId ulong
paginationProperties PaginationProperties<ulong>
properties RestRequestProperties

Returns

IAsyncEnumerable<GuildThread>

GetMessageAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task<RestMessage> GetMessageAsync(ulong channelId, ulong messageId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
messageId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

GetMessagePollAnswerVotersAsync(ulong, ulong, int, PaginationProperties<ulong>?, RestRequestProperties?)

public IAsyncEnumerable<User> GetMessagePollAnswerVotersAsync(ulong channelId, ulong messageId, int answerId, PaginationProperties<ulong>? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

channelId ulong
messageId ulong
answerId int
paginationProperties PaginationProperties<ulong>
properties RestRequestProperties

Returns

IAsyncEnumerable<User>

GetMessageReactionsAsync(ulong, ulong, ReactionEmojiProperties, MessageReactionsPaginationProperties?, RestRequestProperties?)

public IAsyncEnumerable<User> GetMessageReactionsAsync(ulong channelId, ulong messageId, ReactionEmojiProperties emoji, MessageReactionsPaginationProperties? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

channelId ulong
messageId ulong
emoji ReactionEmojiProperties
paginationProperties MessageReactionsPaginationProperties
properties RestRequestProperties

Returns

IAsyncEnumerable<User>

GetMessagesAroundAsync(ulong, ulong, int?, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<RestMessage>> GetMessagesAroundAsync(ulong channelId, ulong messageId, int? limit = null, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
messageId ulong
limit int?
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<RestMessage>>

GetMessagesAsync(ulong, PaginationProperties<ulong>?, RestRequestProperties?)

public IAsyncEnumerable<RestMessage> GetMessagesAsync(ulong channelId, PaginationProperties<ulong>? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

channelId ulong
paginationProperties PaginationProperties<ulong>
properties RestRequestProperties

Returns

IAsyncEnumerable<RestMessage>

GetPinnedMessagesAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<RestMessage>> GetPinnedMessagesAsync(ulong channelId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<RestMessage>>

GetPrivateArchivedGuildThreadsAsync(ulong, PaginationProperties<DateTimeOffset>?, RestRequestProperties?)

public IAsyncEnumerable<GuildThread> GetPrivateArchivedGuildThreadsAsync(ulong channelId, PaginationProperties<DateTimeOffset>? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

channelId ulong
paginationProperties PaginationProperties<DateTimeOffset>
properties RestRequestProperties

Returns

IAsyncEnumerable<GuildThread>

GetPublicArchivedGuildThreadsAsync(ulong, PaginationProperties<DateTimeOffset>?, RestRequestProperties?)

public IAsyncEnumerable<GuildThread> GetPublicArchivedGuildThreadsAsync(ulong channelId, PaginationProperties<DateTimeOffset>? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

channelId ulong
paginationProperties PaginationProperties<DateTimeOffset>
properties RestRequestProperties

Returns

IAsyncEnumerable<GuildThread>

GetSkusAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<Sku>> GetSkusAsync(ulong applicationId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<Sku>>

GetStageInstanceAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<StageInstance> GetStageInstanceAsync(ulong channelId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<StageInstance>

GetStickerAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<StandardSticker> GetStickerAsync(ulong stickerId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

stickerId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<StandardSticker>

GetStickerPackAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<StickerPack> GetStickerPackAsync(ulong stickerPackId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

stickerPackId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<StickerPack>

GetStickerPacksAsync(RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<StickerPack>> GetStickerPacksAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<StickerPack>>

GetUserAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<User> GetUserAsync(ulong userId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

userId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<User>

GetVoiceRegionsAsync(RestRequestProperties?, CancellationToken)

public Task<IEnumerable<VoiceRegion>> GetVoiceRegionsAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IEnumerable<VoiceRegion>>

GetWebhookAsync(ulong, RestRequestProperties?, CancellationToken)

public Task<Webhook> GetWebhookAsync(ulong webhookId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

webhookId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Webhook>

GetWebhookMessageAsync(ulong, string, ulong, RestRequestProperties?, CancellationToken)

public Task<RestMessage> GetWebhookMessageAsync(ulong webhookId, string webhookToken, ulong messageId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

webhookId ulong
webhookToken string
messageId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

GetWebhookWithTokenAsync(ulong, string, RestRequestProperties?, CancellationToken)

public Task<Webhook> GetWebhookWithTokenAsync(ulong webhookId, string webhookToken, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

webhookId ulong
webhookToken string
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Webhook>

GroupDMChannelAddUserAsync(ulong, ulong, GroupDMChannelUserAddProperties, RestRequestProperties?, CancellationToken)

public Task GroupDMChannelAddUserAsync(ulong channelId, ulong userId, GroupDMChannelUserAddProperties groupDMChannelUserAddProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
userId ulong
groupDMChannelUserAddProperties GroupDMChannelUserAddProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

GroupDMChannelDeleteUserAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task GroupDMChannelDeleteUserAsync(ulong channelId, ulong userId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
userId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

GuildPruneAsync(ulong, GuildPruneProperties, RestRequestProperties?, CancellationToken)

public Task<int?> GuildPruneAsync(ulong guildId, GuildPruneProperties pruneProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
pruneProperties GuildPruneProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<int?>

JoinGuildThreadAsync(ulong, RestRequestProperties?, CancellationToken)

public Task JoinGuildThreadAsync(ulong threadId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

threadId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

KickGuildUserAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task KickGuildUserAsync(ulong guildId, ulong userId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
userId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

LeaveGuildAsync(ulong, RestRequestProperties?, CancellationToken)

public Task LeaveGuildAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

LeaveGuildThreadAsync(ulong, RestRequestProperties?, CancellationToken)

public Task LeaveGuildThreadAsync(ulong threadId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

threadId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

ModifyApplicationEmojiAsync(ulong, ulong, Action<ApplicationEmojiOptions>, RestRequestProperties?, CancellationToken)

public Task<ApplicationEmoji> ModifyApplicationEmojiAsync(ulong applicationId, ulong emojiId, Action<ApplicationEmojiOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
emojiId ulong
action Action<ApplicationEmojiOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<ApplicationEmoji>

ModifyAutoModerationRuleAsync(ulong, ulong, Action<AutoModerationRuleOptions>, RestRequestProperties?, CancellationToken)

public Task<AutoModerationRule> ModifyAutoModerationRuleAsync(ulong guildId, ulong autoModerationRuleId, Action<AutoModerationRuleOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
autoModerationRuleId ulong
action Action<AutoModerationRuleOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<AutoModerationRule>

ModifyCurrentApplicationAsync(Action<CurrentApplicationOptions>, RestRequestProperties?, CancellationToken)

public Task<CurrentApplication> ModifyCurrentApplicationAsync(Action<CurrentApplicationOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

action Action<CurrentApplicationOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<CurrentApplication>

ModifyCurrentGuildUserAsync(ulong, Action<CurrentGuildUserOptions>, RestRequestProperties?, CancellationToken)

public Task<GuildUser> ModifyCurrentGuildUserAsync(ulong guildId, Action<CurrentGuildUserOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
action Action<CurrentGuildUserOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildUser>

ModifyCurrentGuildUserVoiceStateAsync(ulong, Action<CurrentUserVoiceStateOptions>, RestRequestProperties?, CancellationToken)

public Task ModifyCurrentGuildUserVoiceStateAsync(ulong guildId, Action<CurrentUserVoiceStateOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
action Action<CurrentUserVoiceStateOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

ModifyCurrentUserAsync(Action<CurrentUserOptions>, RestRequestProperties?, CancellationToken)

public Task<CurrentUser> ModifyCurrentUserAsync(Action<CurrentUserOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

action Action<CurrentUserOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<CurrentUser>

ModifyGlobalApplicationCommandAsync(ulong, ulong, Action<ApplicationCommandOptions>, RestRequestProperties?, CancellationToken)

public Task<ApplicationCommand> ModifyGlobalApplicationCommandAsync(ulong applicationId, ulong commandId, Action<ApplicationCommandOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
commandId ulong
action Action<ApplicationCommandOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<ApplicationCommand>

ModifyGroupDMChannelAsync(ulong, Action<GroupDMChannelOptions>, RestRequestProperties?, CancellationToken)

public Task<Channel> ModifyGroupDMChannelAsync(ulong channelId, Action<GroupDMChannelOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
action Action<GroupDMChannelOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Channel>

ModifyGuildApplicationCommandAsync(ulong, ulong, ulong, Action<ApplicationCommandOptions>, RestRequestProperties?, CancellationToken)

public Task<GuildApplicationCommand> ModifyGuildApplicationCommandAsync(ulong applicationId, ulong guildId, ulong commandId, Action<ApplicationCommandOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
guildId ulong
commandId ulong
action Action<ApplicationCommandOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildApplicationCommand>

ModifyGuildAsync(ulong, Action<GuildOptions>, RestRequestProperties?, CancellationToken)

public Task<RestGuild> ModifyGuildAsync(ulong guildId, Action<GuildOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
action Action<GuildOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestGuild>

ModifyGuildChannelAsync(ulong, Action<GuildChannelOptions>, RestRequestProperties?, CancellationToken)

public Task<Channel> ModifyGuildChannelAsync(ulong channelId, Action<GuildChannelOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
action Action<GuildChannelOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Channel>

ModifyGuildChannelPermissionsAsync(ulong, PermissionOverwriteProperties, RestRequestProperties?, CancellationToken)

public Task ModifyGuildChannelPermissionsAsync(ulong channelId, PermissionOverwriteProperties permissionOverwrite, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
permissionOverwrite PermissionOverwriteProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

ModifyGuildChannelPositionsAsync(ulong, IEnumerable<GuildChannelPositionProperties>, RestRequestProperties?, CancellationToken)

public Task ModifyGuildChannelPositionsAsync(ulong guildId, IEnumerable<GuildChannelPositionProperties> positions, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
positions IEnumerable<GuildChannelPositionProperties>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

ModifyGuildEmojiAsync(ulong, ulong, Action<GuildEmojiOptions>, RestRequestProperties?, CancellationToken)

public Task<GuildEmoji> ModifyGuildEmojiAsync(ulong guildId, ulong emojiId, Action<GuildEmojiOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
emojiId ulong
action Action<GuildEmojiOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildEmoji>

ModifyGuildMfaLevelAsync(ulong, MfaLevel, RestRequestProperties?, CancellationToken)

public Task<MfaLevel> ModifyGuildMfaLevelAsync(ulong guildId, MfaLevel mfaLevel, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
mfaLevel MfaLevel
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<MfaLevel>

ModifyGuildOnboardingAsync(ulong, Action<GuildOnboardingOptions>, RestRequestProperties?, CancellationToken)

public Task<GuildOnboarding> ModifyGuildOnboardingAsync(ulong guildId, Action<GuildOnboardingOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
action Action<GuildOnboardingOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildOnboarding>

ModifyGuildRoleAsync(ulong, ulong, Action<RoleOptions>, RestRequestProperties?, CancellationToken)

public Task<Role> ModifyGuildRoleAsync(ulong guildId, ulong roleId, Action<RoleOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
roleId ulong
action Action<RoleOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Role>

ModifyGuildRolePositionsAsync(ulong, IEnumerable<RolePositionProperties>, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<Role>> ModifyGuildRolePositionsAsync(ulong guildId, IEnumerable<RolePositionProperties> positions, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
positions IEnumerable<RolePositionProperties>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<Role>>

ModifyGuildScheduledEventAsync(ulong, ulong, Action<GuildScheduledEventOptions>, RestRequestProperties?, CancellationToken)

public Task<GuildScheduledEvent> ModifyGuildScheduledEventAsync(ulong guildId, ulong scheduledEventId, Action<GuildScheduledEventOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
scheduledEventId ulong
action Action<GuildScheduledEventOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildScheduledEvent>

ModifyGuildStickerAsync(ulong, ulong, Action<GuildStickerOptions>, RestRequestProperties?, CancellationToken)

public Task<GuildSticker> ModifyGuildStickerAsync(ulong guildId, ulong stickerId, Action<GuildStickerOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
stickerId ulong
action Action<GuildStickerOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildSticker>

ModifyGuildTemplateAsync(ulong, string, Action<GuildTemplateOptions>, RestRequestProperties?, CancellationToken)

public Task<GuildTemplate> ModifyGuildTemplateAsync(ulong guildId, string templateCode, Action<GuildTemplateOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
templateCode string
action Action<GuildTemplateOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildTemplate>

ModifyGuildUserAsync(ulong, ulong, Action<GuildUserOptions>, RestRequestProperties?, CancellationToken)

public Task<GuildUser> ModifyGuildUserAsync(ulong guildId, ulong userId, Action<GuildUserOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
userId ulong
action Action<GuildUserOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildUser>

ModifyGuildUserVoiceStateAsync(ulong, ulong, ulong, Action<VoiceStateOptions>, RestRequestProperties?, CancellationToken)

public Task ModifyGuildUserVoiceStateAsync(ulong guildId, ulong channelId, ulong userId, Action<VoiceStateOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
channelId ulong
userId ulong
action Action<VoiceStateOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

ModifyGuildWelcomeScreenAsync(ulong, Action<GuildWelcomeScreenOptions>, RestRequestProperties?, CancellationToken)

public Task<GuildWelcomeScreen> ModifyGuildWelcomeScreenAsync(ulong guildId, Action<GuildWelcomeScreenOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
action Action<GuildWelcomeScreenOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildWelcomeScreen>

ModifyGuildWidgetSettingsAsync(ulong, Action<GuildWidgetSettingsOptions>, RestRequestProperties?, CancellationToken)

public Task<GuildWidgetSettings> ModifyGuildWidgetSettingsAsync(ulong guildId, Action<GuildWidgetSettingsOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
action Action<GuildWidgetSettingsOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildWidgetSettings>

ModifyInteractionFollowupMessageAsync(ulong, string, ulong, Action<MessageOptions>, RestRequestProperties?, CancellationToken)

public Task<RestMessage> ModifyInteractionFollowupMessageAsync(ulong applicationId, string interactionToken, ulong messageId, Action<MessageOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
interactionToken string
messageId ulong
action Action<MessageOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

ModifyInteractionResponseAsync(ulong, string, Action<MessageOptions>, RestRequestProperties?, CancellationToken)

public Task<RestMessage> ModifyInteractionResponseAsync(ulong applicationId, string interactionToken, Action<MessageOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
interactionToken string
action Action<MessageOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

ModifyMessageAsync(ulong, ulong, Action<MessageOptions>, RestRequestProperties?, CancellationToken)

public Task<RestMessage> ModifyMessageAsync(ulong channelId, ulong messageId, Action<MessageOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
messageId ulong
action Action<MessageOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

ModifyStageInstanceAsync(ulong, Action<StageInstanceOptions>, RestRequestProperties?, CancellationToken)

public Task<StageInstance> ModifyStageInstanceAsync(ulong channelId, Action<StageInstanceOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
action Action<StageInstanceOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<StageInstance>

ModifyWebhookAsync(ulong, Action<WebhookOptions>, RestRequestProperties?, CancellationToken)

public Task<Webhook> ModifyWebhookAsync(ulong webhookId, Action<WebhookOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

webhookId ulong
action Action<WebhookOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Webhook>

ModifyWebhookMessageAsync(ulong, string, ulong, Action<MessageOptions>, ulong?, RestRequestProperties?, CancellationToken)

public Task<RestMessage> ModifyWebhookMessageAsync(ulong webhookId, string webhookToken, ulong messageId, Action<MessageOptions> action, ulong? threadId = null, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

webhookId ulong
webhookToken string
messageId ulong
action Action<MessageOptions>
threadId ulong?
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

ModifyWebhookWithTokenAsync(ulong, string, Action<WebhookOptions>, RestRequestProperties?, CancellationToken)

public Task<Webhook> ModifyWebhookWithTokenAsync(ulong webhookId, string webhookToken, Action<WebhookOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

webhookId ulong
webhookToken string
action Action<WebhookOptions>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<Webhook>

OverwriteApplicationCommandGuildPermissionsAsync(ulong, ulong, ulong, IEnumerable<ApplicationCommandGuildPermissionProperties>, RestRequestProperties?, CancellationToken)

public Task<ApplicationCommandGuildPermissions> OverwriteApplicationCommandGuildPermissionsAsync(ulong applicationId, ulong guildId, ulong commandId, IEnumerable<ApplicationCommandGuildPermissionProperties> newPermissions, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
guildId ulong
commandId ulong
newPermissions IEnumerable<ApplicationCommandGuildPermissionProperties>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<ApplicationCommandGuildPermissions>

PinMessageAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task PinMessageAsync(ulong channelId, ulong messageId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
messageId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

RemoveGuildUserRoleAsync(ulong, ulong, ulong, RestRequestProperties?, CancellationToken)

public Task RemoveGuildUserRoleAsync(ulong guildId, ulong userId, ulong roleId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
userId ulong
roleId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

SearchGuildUsersAsync(ulong, GuildUsersSearchPaginationProperties?, RestRequestProperties?)

public IAsyncEnumerable<GuildUserInfo> SearchGuildUsersAsync(ulong guildId, GuildUsersSearchPaginationProperties? paginationProperties = null, RestRequestProperties? properties = null)

Parameters

guildId ulong
paginationProperties GuildUsersSearchPaginationProperties
properties RestRequestProperties

Returns

IAsyncEnumerable<GuildUserInfo>

SendInteractionFollowupMessageAsync(ulong, string, InteractionMessageProperties, RestRequestProperties?, CancellationToken)

public Task<RestMessage> SendInteractionFollowupMessageAsync(ulong applicationId, string interactionToken, InteractionMessageProperties message, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
interactionToken string
message InteractionMessageProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

SendInteractionResponseAsync(ulong, string, InteractionCallback, RestRequestProperties?, CancellationToken)

public Task SendInteractionResponseAsync(ulong interactionId, string interactionToken, InteractionCallback callback, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

interactionId ulong
interactionToken string
callback InteractionCallback
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

SendMessageAsync(ulong, MessageProperties, RestRequestProperties?, CancellationToken)

public Task<RestMessage> SendMessageAsync(ulong channelId, MessageProperties message, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
message MessageProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<RestMessage>

SendRequestAsync(HttpMethod, FormattableString, string?, TopLevelResourceInfo?, RestRequestProperties?, bool, CancellationToken)

public Task<Stream> SendRequestAsync(HttpMethod method, FormattableString route, string? query = null, TopLevelResourceInfo? resourceInfo = null, RestRequestProperties? properties = null, bool global = true, CancellationToken cancellationToken = default)

Parameters

method HttpMethod
route FormattableString
query string
resourceInfo TopLevelResourceInfo?
properties RestRequestProperties
global bool
cancellationToken CancellationToken

Returns

Task<Stream>

SendRequestAsync(HttpMethod, HttpContent, FormattableString, string?, TopLevelResourceInfo?, RestRequestProperties?, bool, CancellationToken)

public Task<Stream> SendRequestAsync(HttpMethod method, HttpContent content, FormattableString route, string? query = null, TopLevelResourceInfo? resourceInfo = null, RestRequestProperties? properties = null, bool global = true, CancellationToken cancellationToken = default)

Parameters

method HttpMethod
content HttpContent
route FormattableString
query string
resourceInfo TopLevelResourceInfo?
properties RestRequestProperties
global bool
cancellationToken CancellationToken

Returns

Task<Stream>

SyncGuildTemplateAsync(ulong, string, RestRequestProperties?, CancellationToken)

public Task<GuildTemplate> SyncGuildTemplateAsync(ulong guildId, string templateCode, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
templateCode string
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<GuildTemplate>

TriggerTypingStateAsync(ulong, RestRequestProperties?, CancellationToken)

public Task TriggerTypingStateAsync(ulong channelId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

UnbanGuildUserAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task UnbanGuildUserAsync(ulong guildId, ulong userId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

guildId ulong
userId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

UnpinMessageAsync(ulong, ulong, RestRequestProperties?, CancellationToken)

public Task UnpinMessageAsync(ulong channelId, ulong messageId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

channelId ulong
messageId ulong
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task

UpdateApplicationRoleConnectionMetadataRecordsAsync(ulong, IEnumerable<ApplicationRoleConnectionMetadataProperties>, RestRequestProperties?, CancellationToken)

public Task<IReadOnlyList<ApplicationRoleConnectionMetadata>> UpdateApplicationRoleConnectionMetadataRecordsAsync(ulong applicationId, IEnumerable<ApplicationRoleConnectionMetadataProperties> applicationRoleConnectionMetadataProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
applicationRoleConnectionMetadataProperties IEnumerable<ApplicationRoleConnectionMetadataProperties>
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<ApplicationRoleConnectionMetadata>>

UpdateCurrentUserApplicationRoleConnectionAsync(ulong, ApplicationRoleConnectionProperties, RestRequestProperties?, CancellationToken)

public Task<ApplicationRoleConnection> UpdateCurrentUserApplicationRoleConnectionAsync(ulong applicationId, ApplicationRoleConnectionProperties applicationRoleConnectionProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)

Parameters

applicationId ulong
applicationRoleConnectionProperties ApplicationRoleConnectionProperties
properties RestRequestProperties
cancellationToken CancellationToken

Returns

Task<ApplicationRoleConnection>