Table of Contents

Method RequestTwoFactorAsync

Namespace
DisCatSharp.Extensions.TwoFactorCommands.ApplicationCommands
Assembly
DisCatSharp.Extensions.TwoFactorCommands.dll

RequestTwoFactorAsync(BaseContext)

Asks the user via modal input for the two factor code.

This uses DisCatSharp.Interactivity.

To be used as first action for application commands.

public static Task<TwoFactorResponse> RequestTwoFactorAsync(this BaseContext ctx)

Parameters

ctx BaseContext

The base context.

Returns

Task<TwoFactorResponse>

A TwoFactorResponse.

RequestTwoFactorAsync(ComponentInteractionCreateEventArgs, DiscordClient)

Asks the user via modal input for the two factor code.

This uses DisCatSharp.Interactivity.

To be used as first action for button.

public static Task<TwoFactorResponse> RequestTwoFactorAsync(this ComponentInteractionCreateEventArgs evt, DiscordClient client)

Parameters

evt ComponentInteractionCreateEventArgs

The interaction context.

client DiscordClient

The discord client to use.

Returns

Task<TwoFactorResponse>

A TwoFactorResponse.