Table of Contents

Class InteractivityExtension

Namespace
DSharpPlus.Interactivity
Assembly
DSharpPlus.Interactivity.dll

Extension class for DSharpPlus.Interactivity

public class InteractivityExtension
Inheritance
object
InteractivityExtension

Properties

Client

Methods

CollectEventArgsAsync<T>(Func<T, bool>, TimeSpan?)
CollectReactionsAsync(DiscordMessage, TimeSpan?)

Collects reactions on a specific message.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

DoPollAsync(DiscordMessage, IEnumerable<DiscordEmoji>, PollBehaviour?, TimeSpan?)

Makes a poll and returns poll results.

GeneratePagesInContent(string, SplitType)

Generates pages from a string, and puts them in message content.

GeneratePagesInEmbed(string, SplitType, DiscordEmbedBuilder)

Generates pages from a string, and puts them in message embeds.

SendPaginatedMessageAsync(DiscordChannel, DiscordUser, IEnumerable<Page>, PaginationButtons, PaginationBehaviour?, ButtonPaginationBehavior?, CancellationToken)

Sends a paginated message with buttons.

SendPaginatedMessageAsync(DiscordChannel, DiscordUser, IEnumerable<Page>, PaginationButtons, TimeSpan?, PaginationBehaviour?, ButtonPaginationBehavior?)

Sends a paginated message with buttons.

SendPaginatedMessageAsync(DiscordChannel, DiscordUser, IEnumerable<Page>, PaginationEmojis, PaginationBehaviour?, PaginationDeletion?, TimeSpan?)

Sends a paginated message. For this Event you need the GuildMessageReactions intent specified in Intents

SendPaginatedMessageAsync(DiscordChannel, DiscordUser, IEnumerable<Page>, PaginationBehaviour?, ButtonPaginationBehavior?, CancellationToken)

Sends a paginated message with buttons.

SendPaginatedMessageAsync(DiscordChannel, DiscordUser, IEnumerable<Page>, TimeSpan?, PaginationBehaviour?, ButtonPaginationBehavior?)

Sends a paginated message with buttons.

SendPaginatedResponseAsync(DiscordInteraction, bool, DiscordUser, IEnumerable<Page>, PaginationButtons, PaginationBehaviour?, ButtonPaginationBehavior?, bool, ButtonDisableBehavior, List<PaginationButtonType>, CancellationToken)

Sends a paginated message in response to an interaction.

Pass the interaction directly. Interactivity will ACK it.

Setup(DiscordClient)
WaitForButtonAsync(DiscordMessage, DiscordUser, TimeSpan?)

Waits for any button on the specified message to be pressed by the specified user.

WaitForButtonAsync(DiscordMessage, DiscordUser, CancellationToken)

Waits for any button on the specified message to be pressed by the specified user.

WaitForButtonAsync(DiscordMessage, IEnumerable<DiscordButtonComponent>, TimeSpan?)

Waits for any button in the specified collection to be pressed.

WaitForButtonAsync(DiscordMessage, IEnumerable<DiscordButtonComponent>, CancellationToken)

Waits for any button in the specified collection to be pressed.

WaitForButtonAsync(DiscordMessage, Func<ComponentInteractionCreatedEventArgs, bool>, TimeSpan?)

Waits for any button to be interacted with.

WaitForButtonAsync(DiscordMessage, Func<ComponentInteractionCreatedEventArgs, bool>, CancellationToken)

Waits for any button to be interacted with.

WaitForButtonAsync(DiscordMessage, TimeSpan?)

Waits for any button on the specified message to be pressed.

WaitForButtonAsync(DiscordMessage, string, TimeSpan?)

Waits for a button with the specified Id to be pressed.

WaitForButtonAsync(DiscordMessage, string, CancellationToken)

Waits for a button with the specified Id to be pressed.

WaitForButtonAsync(DiscordMessage, CancellationToken)

Waits for any button on the specified message to be pressed.

WaitForCustomComponentPaginationAsync(IPaginationRequest)

Waits for custom button-based pagination request to finish.
This does not invoke DoCleanupAsync().

WaitForCustomPaginationAsync(IPaginationRequest)

Waits for a custom pagination request to finish. This does NOT handle removing emojis after finishing for you.

WaitForEventArgsAsync<T>(Func<T, bool>, TimeSpan?)

Waits for specific event args to be received. Make sure the appropriate DiscordIntents are registered, if needed.

WaitForMessageAsync(Func<DiscordMessage, bool>, TimeSpan?)

Waits for a specific message.

WaitForModalAsync(string, DiscordUser, TimeSpan?)

Waits for a modal with the specificed custom id to be submitted by the given user.

WaitForModalAsync(string, DiscordUser, CancellationToken)

Waits for a modal with the specificed custom id to be submitted by the given user.

WaitForModalAsync(string, TimeSpan?)

Waits for a modal with the specified id to be submitted.

WaitForModalAsync(string, CancellationToken)

Waits for a modal with the specified id to be submitted.

WaitForReactionAsync(DiscordMessage, DiscordUser, TimeSpan?)

Wait for a specific reaction. For this Event you need the GuildMessageReactions intent specified in Intents

WaitForReactionAsync(Func<MessageReactionAddedEventArgs, bool>, DiscordMessage, DiscordUser, TimeSpan?)

Waits for a specific reaction. For this Event you need the GuildMessageReactions intent specified in Intents

WaitForReactionAsync(Func<MessageReactionAddedEventArgs, bool>, DiscordUser, TimeSpan?)

Waits for a specific reaction. For this Event you need the GuildMessageReactions intent specified in Intents

WaitForReactionAsync(Func<MessageReactionAddedEventArgs, bool>, TimeSpan?)

Wait for a specific reaction.

WaitForSelectAsync(DiscordMessage, DiscordUser, string, TimeSpan?)

Waits for a dropdown to be interacted with by a specific user.

WaitForSelectAsync(DiscordMessage, DiscordUser, string, CancellationToken)

Waits for a dropdown to be interacted with by a specific user.

WaitForSelectAsync(DiscordMessage, Func<ComponentInteractionCreatedEventArgs, bool>, TimeSpan?)

Waits for any dropdown to be interacted with.

WaitForSelectAsync(DiscordMessage, Func<ComponentInteractionCreatedEventArgs, bool>, CancellationToken)

Waits for any dropdown to be interacted with.

WaitForSelectAsync(DiscordMessage, string, TimeSpan?)

Waits for a dropdown to be interacted with.

WaitForSelectAsync(DiscordMessage, string, CancellationToken)

Waits for a dropdown to be interacted with.

WaitForTypingAsync(DiscordChannel, TimeSpan?)

Waits for any user to start typing.

WaitForUserTypingAsync(DiscordUser, DiscordChannel, TimeSpan?)

Waits for a user to start typing.

WaitForUserTypingAsync(DiscordUser, TimeSpan?)

Waits for a user to start typing.