Table of Contents
API reference

Class InteractivityExtension

Namespace
DisCatSharp.Interactivity
Assembly
DisCatSharp.Interactivity.dll

Extension class for DisCatSharp.Interactivity

public class InteractivityExtension : BaseExtension, IDisposable
Inheritance
InteractivityExtension
Implements
Inherited Members

Methods

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

Collects the event arguments.

CollectReactionsAsync(DiscordMessage, TimeSpan?)

Collects reactions on a specific message.

Dispose()

Disposes the interactivity extension and all internal components.

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

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>, PaginationEmojis?, PaginationBehaviour?, PaginationDeletion?, TimeSpan?, CancellationToken)

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

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>, PaginationBehaviour?, ButtonPaginationBehavior?, CancellationToken)

Sends the paginated message.

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

Sends the paginated message.

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

Sends a paginated message in response to an interaction.

Pass the interaction directly. Interactivity will ACK it.

Setup(DiscordClient)

Setups the Interactivity Extension.

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<ComponentInteractionCreateEventArgs, bool>, TimeSpan?)

Waits for any button to be interacted with.

WaitForButtonAsync(DiscordMessage, Func<ComponentInteractionCreateEventArgs, 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, TimeSpan?)

Waits for a user modal submit.

WaitForModalAsync(string, CancellationToken)

Waits for a user modal submit.

WaitForReactionAsync(DiscordMessage, DiscordUser, TimeSpan?)

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

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

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

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

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

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

Wait for a specific reaction.

WaitForSelectAsync(DiscordMessage, DiscordUser, string, ComponentType, TimeSpan?)

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

WaitForSelectAsync(DiscordMessage, DiscordUser, string, ComponentType, CancellationToken)

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

WaitForSelectAsync(DiscordMessage, Func<ComponentInteractionCreateEventArgs, bool>, ComponentType, TimeSpan?)

Waits for any dropdown to be interacted with.

WaitForSelectAsync(DiscordMessage, Func<ComponentInteractionCreateEventArgs, bool>, ComponentType, CancellationToken)

Waits for any dropdown to be interacted with.

WaitForSelectAsync(DiscordMessage, string, ComponentType, TimeSpan?)

Waits for a dropdown to be interacted with.

WaitForSelectAsync(DiscordMessage, string, ComponentType, 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.