Table of Contents
API reference

Method GetNextMessageAsync

Namespace
DisCatSharp.Interactivity.Extensions
Assembly
DisCatSharp.Interactivity.dll

GetNextMessageAsync(DiscordMessage, TimeSpan?)

Waits for the next message that has the same author and channel as this message.

public static Task<InteractivityResult<DiscordMessage>> GetNextMessageAsync(this DiscordMessage message, TimeSpan? timeoutOverride = null)

Parameters

message DiscordMessage

Original message.

timeoutOverride TimeSpan?

Overrides the timeout set in Timeout

Returns

Task<InteractivityResult<DiscordMessage>>

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

Waits for the next message with the same author and channel as this message, which also satisfies a predicate.

public static Task<InteractivityResult<DiscordMessage>> GetNextMessageAsync(this DiscordMessage message, Func<DiscordMessage, bool> predicate, TimeSpan? timeoutOverride = null)

Parameters

message DiscordMessage

Original message.

predicate Func<DiscordMessage, bool>

A predicate that should return true if a message matches.

timeoutOverride TimeSpan?

Overrides the timeout set in Timeout

Returns

Task<InteractivityResult<DiscordMessage>>