Table of Contents

Method WaitForReactionAsync

Namespace
DSharpPlus.Interactivity.Extensions
Assembly
DSharpPlus.Interactivity.dll

WaitForReactionAsync(DiscordMessage, DiscordUser, TimeSpan?)

Waits for a reaction on this message from a specific user.

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

Parameters

message DiscordMessage

Target message.

user DiscordUser

The target user.

timeoutOverride TimeSpan?

Overrides the timeout set in Timeout

Returns

Task<InteractivityResult<MessageReactionAddedEventArgs>>

Exceptions

InvalidOperationException

Thrown if interactivity is not enabled for the client associated with the message.

WaitForReactionAsync(DiscordMessage, DiscordUser, DiscordEmoji, TimeSpan?)

Waits for a specific reaction on this message from the specified user.

public static Task<InteractivityResult<MessageReactionAddedEventArgs>> WaitForReactionAsync(this DiscordMessage message, DiscordUser user, DiscordEmoji emoji, TimeSpan? timeoutOverride = null)

Parameters

message DiscordMessage

Target message.

user DiscordUser

The target user.

emoji DiscordEmoji

The target emoji.

timeoutOverride TimeSpan?

Overrides the timeout set in Timeout

Returns

Task<InteractivityResult<MessageReactionAddedEventArgs>>

Exceptions

InvalidOperationException

Thrown if interactivity is not enabled for the client associated with the message.