Table of Contents

Method WaitForReactionAsync

Namespace
DSharpPlus.Interactivity
Assembly
DSharpPlus.Interactivity.dll

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

Wait for a specific reaction.

public Task<InteractivityResult<MessageReactionAddedEventArgs>> WaitForReactionAsync(Func<MessageReactionAddedEventArgs, bool> predicate, TimeSpan? timeoutoverride = null)

Parameters

predicate Func<MessageReactionAddedEventArgs, bool>

Predicate to match.

timeoutoverride TimeSpan?

override timeout period.

Returns

Task<InteractivityResult<MessageReactionAddedEventArgs>>

WaitForReactionAsync(DiscordMessage, DiscordUser, TimeSpan?)

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

public Task<InteractivityResult<MessageReactionAddedEventArgs>> WaitForReactionAsync(DiscordMessage message, DiscordUser user, TimeSpan? timeoutoverride = null)

Parameters

message DiscordMessage

Message reaction was added to.

user DiscordUser

User that made the reaction.

timeoutoverride TimeSpan?

override timeout period.

Returns

Task<InteractivityResult<MessageReactionAddedEventArgs>>

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

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

public Task<InteractivityResult<MessageReactionAddedEventArgs>> WaitForReactionAsync(Func<MessageReactionAddedEventArgs, bool> predicate, DiscordMessage message, DiscordUser user, TimeSpan? timeoutoverride = null)

Parameters

predicate Func<MessageReactionAddedEventArgs, bool>

Predicate to match.

message DiscordMessage

Message reaction was added to.

user DiscordUser

User that made the reaction.

timeoutoverride TimeSpan?

override timeout period.

Returns

Task<InteractivityResult<MessageReactionAddedEventArgs>>

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

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

public Task<InteractivityResult<MessageReactionAddedEventArgs>> WaitForReactionAsync(Func<MessageReactionAddedEventArgs, bool> predicate, DiscordUser user, TimeSpan? timeoutoverride = null)

Parameters

predicate Func<MessageReactionAddedEventArgs, bool>

predicate to match.

user DiscordUser

User that made the reaction.

timeoutoverride TimeSpan?

Override timeout period.

Returns

Task<InteractivityResult<MessageReactionAddedEventArgs>>