Class DiscordRestClient
- Namespace
- DSharpPlus
- Assembly
- DSharpPlus.Rest.dll
public class DiscordRestClient : BaseDiscordClient
- Inheritance
-
DiscordRestClient
- Inherited Members
Constructors
Properties
- Guilds
Gets the dictionary of guilds cached by this client.
Methods
- AddGuildMemberAsync(ulong, ulong, string, string, IEnumerable<ulong>, bool, bool)
Adds a member to a guild
- AddGuildMemberRoleAsync(ulong, ulong, ulong, string)
Add role to guild member
- AddThreadMemberAsync(ulong, ulong)
Adds a member to a thread.
- BatchEditApplicationCommandPermissionsAsync(ulong, IEnumerable<DiscordGuildApplicationCommandPermissions>)
Batch edits permissions for a application command in a guild.
- BeginGuildPruneAsync(ulong, int, bool, IEnumerable<ulong>, string)
Begins a guild prune.
- BulkOverwriteGlobalApplicationCommandsAsync(IEnumerable<DiscordApplicationCommand>)
Overwrites the existing global application commands. New commands are automatically created and missing commands are automatically deleted.
- BulkOverwriteGuildApplicationCommandsAsync(ulong, IEnumerable<DiscordApplicationCommand>)
Overwrites the existing application commands in a guild. New commands are automatically created and missing commands are automatically deleted.
- CreateChannelInviteAsync(ulong, int, int, bool, bool, string, DiscordInviteTargetType?, ulong?, ulong?)
Creates a channel invite
- CreateDmAsync(ulong)
Creates a DM
- CreateEmojiAsync(ulong, string, Stream, IEnumerable<ulong>, string)
Creates an emoji in a guild.
- CreateFollowupMessageAsync(string, DiscordFollowupMessageBuilder)
Creates a follow up message to an interaction.
- CreateGlobalApplicationCommandAsync(DiscordApplicationCommand)
Creates or overwrites a global application command.
- CreateGroupDmAsync(IEnumerable<string>, IDictionary<ulong, string>)
Creates a group DM
- CreateGroupDmWithCurrentUserAsync(IEnumerable<string>, IDictionary<ulong, string>)
Creates a group DM with current user
- CreateGuildApplicationCommandAsync(ulong, DiscordApplicationCommand)
Creates or overwrites a guild application command.
- CreateGuildAsync(string, string, string, DiscordVerificationLevel?, DiscordDefaultMessageNotifications?, DiscordSystemChannelFlags?)
Creates a new guild
- CreateGuildBanAsync(ulong, ulong, int, string)
Creates guild ban
- CreateGuildBansAsync(ulong, IEnumerable<ulong>, int, string)
Creates multiple guild bans
- CreateGuildFromTemplateAsync(string, string, string)
Creates a guild from a template. This requires the bot to be in less than 10 guilds total.
- CreateGuildIntegrationAsync(ulong, string, ulong)
Creates guild integration
- CreateGuildRoleAsync(ulong, string, DiscordPermissions?, int?, bool?, bool?, string, Stream, DiscordEmoji)
Creates a new role
- CreateGuildStickerAsync(ulong, string, string, string, Stream, DiscordStickerFormat, string)
Creates a sticker in a guild.
- CreateGuildTemplateAsync(ulong, string, string)
Creates a guild template.
- CreateInteractionResponseAsync(ulong, string, DiscordInteractionResponseType, DiscordInteractionResponseBuilder)
Creates a response to an interaction.
- CreateMessageAsync(ulong, DiscordEmbed)
Sends a message
- CreateMessageAsync(ulong, DiscordMessageBuilder)
Sends a message
- CreateMessageAsync(ulong, Action<DiscordMessageBuilder>)
Sends a message
- CreateMessageAsync(ulong, string)
Sends a message
- CreateMessageAsync(ulong, string, DiscordEmbed)
Sends a message
- CreateReactionAsync(ulong, ulong, string)
Creates a new reaction
- CreateScheduledGuildEventAsync(ulong, string, string, ulong?, DiscordScheduledGuildEventType, DiscordScheduledGuildEventPrivacyLevel, DateTimeOffset, DateTimeOffset?, Stream?, string)
Creates a new scheduled guild event.
- CreateStageInstanceAsync(ulong, string, DiscordStagePrivacyLevel?, string)
Creates a stage instance in a stage channel.
- CreateThreadAsync(ulong, string, DiscordAutoArchiveDuration, DiscordChannelType, string)
Creates a thread.
- CreateThreadFromMessageAsync(ulong, ulong, string, DiscordAutoArchiveDuration, string)
Creates a thread from a message.
- CreateWebhookAsync(ulong, string, Stream, string)
Creates a new webhook
- CreateWebhookAsync(ulong, string, string, string)
Creates a new webhook
- CrosspostMessageAsync(ulong, ulong)
Publishes a message in a news channel to following channels
- DeleteAllReactionsAsync(ulong, ulong, string)
Deletes all reactions from a message
- DeleteChannelAsync(ulong, string)
Deletes a channel
- DeleteChannelPermissionAsync(ulong, ulong, string)
Deletes channel overwrite
- DeleteFollowupMessageAsync(string, ulong)
Deletes a follow up message.
- DeleteGlobalApplicationCommandAsync(ulong)
Deletes a global application command.
- DeleteGuildApplicationCommandAsync(ulong, ulong)
Deletes a application command in a guild.
- DeleteGuildAsync(ulong)
Deletes a guild
- DeleteGuildEmojiAsync(ulong, ulong, string)
Deletes a guild's emoji.
- DeleteGuildIntegrationAsync(ulong, DiscordIntegration, string)
Removes a guild integration
- DeleteGuildRoleAsync(ulong, ulong, string)
Deletes a role
- DeleteGuildStickerAsync(ulong, ulong, string)
Deletes a sticker in a guild.
- DeleteGuildTemplateAsync(ulong, string)
Deletes the template.
- DeleteInviteAsync(string, string)
Removes an invite
- DeleteMessageAsync(ulong, ulong, string)
Deletes a message
- DeleteMessagesAsync(ulong, IEnumerable<ulong>, string)
Deletes multiple messages
- DeleteOriginalInteractionResponseAsync(string)
Deletes the original interaction response.
The token of the interaction.
- DeleteOwnReactionAsync(ulong, ulong, string)
Deletes own reaction
- DeleteReactionsEmojiAsync(ulong, ulong, string)
Deletes all reactions of a specific reaction for a message.
- DeleteScheduledGuildEventAsync(ulong, ulong)
Delete a scheduled guild event.
- DeleteStageInstanceAsync(ulong, string)
Deletes a stage instance in a stage channel.
- DeleteUserReactionAsync(ulong, ulong, ulong, string, string)
Deletes someone elses reaction
- DeleteWebhookAsync(ulong, string)
Deletes a webhook
- DeleteWebhookAsync(ulong, string, string)
Deletes a webhook (when user is not in said guild)
- DeleteWebhookMessageAsync(ulong, string, ulong)
Deletes a message that was created by a webhook.
- Dispose()
Disposes this client.
- EditApplicationCommandPermissionsAsync(ulong, ulong, IEnumerable<DiscordApplicationCommandPermission>)
Edits permissions for a application command in a guild.
- EditChannelPermissionsAsync(ulong, ulong, DiscordPermissions, DiscordPermissions, string, string)
Edits channel overwrite
- EditFollowupMessageAsync(string, ulong, DiscordWebhookBuilder, IEnumerable<DiscordAttachment>)
Edits a follow up message.
- EditGlobalApplicationCommandAsync(ulong, Action<ApplicationCommandEditModel>)
Edits a global application command.
- EditGuildApplicationCommandAsync(ulong, ulong, Action<ApplicationCommandEditModel>)
Edits a application command in a guild.
- EditMessageAsync(ulong, ulong, DiscordMessageBuilder, bool, IEnumerable<DiscordAttachment>)
Edits a message
- EditMessageAsync(ulong, ulong, Optional<DiscordEmbed>)
Edits a message
- EditMessageAsync(ulong, ulong, Optional<string>)
Edits a message
- EditOriginalInteractionResponseAsync(string, DiscordWebhookBuilder, IEnumerable<DiscordAttachment>)
Edits the original interaction response.
- EditWebhookMessageAsync(ulong, string, ulong, DiscordWebhookBuilder, IEnumerable<DiscordAttachment>)
Edits a previously-sent webhook message.
- ExecuteWebhookAsync(ulong, string, DiscordWebhookBuilder)
Sends a message to a webhook
- FollowChannelAsync(ulong, ulong)
Follows a news channel
- GetApplicationAssetsAsync(DiscordApplication)
Gets assets from an application
- GetChannelAsync(ulong)
Gets a channel object
- GetChannelInvitesAsync(ulong)
Gets a channel's invites
- GetChannelMessageAsync(ulong, ulong)
Gets a message from a channel
- GetChannelMessagesAsync(ulong, int, ulong?, ulong?, ulong?)
Gets messages from a channel
- GetChannelWebhooksAsync(ulong)
Gets all webhooks from a channel
- GetCurrentUserAsync()
Gets current user object
- GetCurrentUserGuildMemberAsync(ulong)
Gets the guild member for the current user in the specified guild. Only works with bearer tokens with the guilds.members.read scope.
- GetCurrentUserGuildsAsync(int, ulong?, ulong?)
Gets current user's guilds
- GetGlobalApplicationCommandAsync(ulong)
Gets a global application command by its ID.
- GetGlobalApplicationCommandsAsync()
Gets all the global application commands for this application.
- GetGuildApplicationCommandAsync(ulong, ulong)
Gets a application command in a guild by its ID.
- GetGuildApplicationCommandPermissionsAsync(ulong, ulong)
Gets permissions for a application command in a guild.
- GetGuildApplicationCommandsAsync(ulong)
Gets all the application commands for a guild.
- GetGuildApplicationCommandsPermissionsAsync(ulong)
Gets all application command permissions in a guild.
- GetGuildAsync(ulong, bool?)
Gets a guild.
- GetGuildBanAsync(ulong, ulong)
Gets the ban of the specified user. Requires Ban Members permission.
- GetGuildBansAsync(ulong, int?, ulong?, ulong?)
Gets guild bans.
- GetGuildChannelsAsync(ulong)
Gets channels from a guild
- GetGuildEmojiAsync(ulong, ulong)
Gets a guild emoji.
- GetGuildEmojisAsync(ulong)
Gets a guild's emojis.
- GetGuildIntegrationsAsync(ulong)
Gets guild integrations
- GetGuildInvitesAsync(ulong)
Get a guild's invites
- GetGuildMemberAsync(ulong, ulong)
Gets guild member
- GetGuildMembershipScreeningFormAsync(ulong)
Gets a guild's membership screening form.
- GetGuildPreviewAsync(ulong)
Gets a guild preview.
- GetGuildPruneCountAsync(ulong, int, IEnumerable<ulong>)
Get a guild's prune count.
- GetGuildRolesAsync(ulong)
Gets roles
- GetGuildStickerAsync(ulong, ulong)
Gets a sticker from a guild.
- GetGuildStickersAsync(ulong)
Gets a list of stickers from a guild.
- GetGuildTemplatesAsync(ulong)
Gets a guild's templates.
- GetGuildVanityUrlAsync(ulong)
Gets a guild's vanity url
- GetGuildVoiceRegionsAsync(ulong)
Get a guild's voice region
- GetGuildWebhooksAsync(ulong)
Gets all webhooks from a guild
- GetGuildWelcomeScreenAsync(ulong)
Gets a guild's welcome screen.
- GetGuildWidgetAsync(ulong)
Gets a guild's widget
- GetGuildWidgetSettingsAsync(ulong)
Gets a guild's widget settings
- GetInviteAsync(string, bool?, bool?)
Gets an invite.
- GetMessageAsync(ulong, ulong)
Gets message in a channel
- GetOriginalInteractionResponseAsync(string)
Gets the original interaction response.
- GetPinnedMessagesAsync(ulong)
Gets pinned messages
- GetReactionsAsync(ulong, ulong, DiscordEmoji, ulong?, int)
Gets all users that reacted with a specific emoji to a message
- GetReactionsAsync(ulong, ulong, string, ulong?, int)
Gets all users that reacted with a specific emoji to a message
- GetScheduledGuildEventAsync(ulong, ulong)
Gets a specific scheduled guild event.
- GetScheduledGuildEventUsersAsync(ulong, ulong, int, ulong?, ulong?)
Gets the users interested in the guild event.
- GetScheduledGuildEventsAsync(ulong)
Gets all available scheduled guild events.
- GetStageInstanceAsync(ulong)
Gets a stage instance in a stage channel.
- GetStickerAsync(ulong)
Gets a sticker by its ID.
- GetStickerPacksAsync()
Gets a collection of sticker packs that may be used by nitro users.
- GetTemplateAsync(string)
Gets a guild template by the code.
- GetUserAsync(ulong)
Gets user object
- GetUsersConnectionsAsync()
Gets current user's connections
- GetWebhookAsync(ulong)
Gets a webhook
- GetWebhookWithTokenAsync(ulong, string)
Gets a webhook with its token (when user is not in said guild)
- GroupDmAddRecipientAsync(ulong, ulong, string, string)
Adds a member to a group DM
- GroupDmRemoveRecipientAsync(ulong, ulong)
Removes a member from a group DM
- InitializeCacheAsync()
Initializes cache
- JoinGroupDmAsync(ulong, string)
Joins a group DM
- JoinThreadAsync(ulong)
Joins a thread.
- LeaveGroupDmAsync(ulong)
Leaves a group DM
- LeaveGuildAsync(ulong)
Leaves a guild
- LeaveThreadAsync(ulong)
Leaves a thread.
- ListActiveThreadAsync(ulong)
Lists the active threads of a guild.
- ListGuildMembersAsync(ulong, int?, ulong?)
Gets all guild members
- ListJoinedPrivateArchivedThreadsAsync(ulong, ulong, DateTimeOffset?, int)
Gets the private archived threads the user has joined for a channel.
- ListPrivateArchivedThreadAsync(ulong, ulong, DateTimeOffset?, int)
Gets the threads that are public and archived for a channel.
- ListPublicArchivedThreadsAsync(ulong, ulong, DateTimeOffset?, int)
Gets the threads that are public and archived for a channel.
- ListThreadMembersAsync(ulong)
Lists the members of a thread.
- ModifyAsync(ulong, ulong, Action<MemberEditModel>)
Modifies a member
- ModifyChannelAsync(ulong, Action<ChannelEditModel>)
Modifies a channel
- ModifyCurrentMemberAsync(ulong, string, string)
Changes the current user in a guild.
- ModifyCurrentUserAsync(string, Stream?, Stream?)
Modifies current user
- ModifyCurrentUserAsync(string, string, string)
Modifies current user
- ModifyEmbedSuppressionAsync(ulong, ulong, bool)
Modifies the visibility of embeds in a message.
- ModifyGuildAsync(ulong, Action<GuildEditModel>)
Modifies a guild
- ModifyGuildEmojiAsync(ulong, ulong, string, IEnumerable<ulong>, string)
Modifies a guild's emoji.
- ModifyGuildIntegrationAsync(ulong, ulong, int, int, bool)
Modifies a guild integration
- ModifyGuildMemberAsync(ulong, ulong, Optional<string>, Optional<IEnumerable<ulong>>, Optional<bool>, Optional<bool>, Optional<ulong?>, Optional<DateTimeOffset?>, string)
Modifies guild member.
- ModifyGuildMembershipScreeningFormAsync(ulong, Action<MembershipScreeningEditModel>)
Modifies a guild's membership screening form.
- ModifyGuildRoleAsync(ulong, ulong, Action<RoleEditModel>)
Modifies a role
- ModifyGuildRoleAsync(ulong, ulong, string, DiscordPermissions?, DiscordColor?, bool?, bool?, string, Stream, DiscordEmoji)
Modifies a role
- ModifyGuildStickerAsync(ulong, ulong, Action<StickerEditModel>, string)
Modifies a sticker in a guild.
- ModifyGuildTemplateAsync(ulong, string, string, string)
Modifies the template's metadata.
- ModifyGuildWelcomeScreenAsync(ulong, Action<WelcomeScreenEditModel>, string)
Modifies a guild's welcome screen.
- ModifyGuildWidgetSettingsAsync(ulong, bool?, ulong?, string)
Modifies a guild's widget settings
- ModifyScheduledGuildEventAsync(ulong, ulong, Action<ScheduledGuildEventEditModel>)
Modify a scheduled guild event.
- ModifyStageInstanceAsync(ulong, Action<StageInstanceEditModel>)
Modifies a stage instance in a stage channel.
- ModifyWebhookAsync(ulong, string, Stream, string, string)
Modifies a webhook (when user is not in said guild)
- ModifyWebhookAsync(ulong, string, string, string, string)
Modifies a webhook (when user is not in said guild)
- ModifyWebhookAsync(ulong, ulong, string, Stream, string)
Modifies a webhook
- ModifyWebhookAsync(ulong, ulong, string, string, string)
Modifies a webhook
- PinMessageAsync(ulong, ulong)
Pins a message.
- RemoveGuildBanAsync(ulong, ulong, string)
Removes a guild ban
- RemoveGuildMemberAsync(ulong, ulong, string)
Removes guild member
- RemoveGuildMemberRoleAsync(ulong, ulong, ulong, string)
Remove role from member
- RemoveThreadMemberAsync(ulong, ulong)
Removes a member from a thread.
- SearchMembersAsync(ulong, string, int?)
Searches the given guild for members who's display name start with the specified name.
- SyncGuildIntegrationAsync(ulong, ulong)
Syncs guild integration
- SyncGuildTemplateAsync(ulong, string)
Syncs the template to the current guild's state.
- TriggerTypingAsync(ulong)
Send a typing indicator to a channel
- UnpinMessageAsync(ulong, ulong)
Unpins a message
- UpdateChannelPositionAsync(ulong, ulong, int, string, bool?, ulong?)
Updates a channel's position
- UpdateCurrentUserVoiceStateAsync(ulong, ulong, bool?, DateTimeOffset?)
Updates the current user's suppress state in a stage channel.
- UpdateRolePositionAsync(ulong, ulong, string)
Updates a role's position
- UpdateUserVoiceStateAsync(ulong, ulong, ulong, bool?)
Updates a member's suppress state in a stage channel.