Table of Contents

Class ModalInteractionContext

Namespace
NetCord.Services.ComponentInteractions
Assembly
NetCord.Services.dll

Context for handling modal interactions.

public class ModalInteractionContext : BaseModalInteractionContext, IComponentInteractionContext, IInteractionContext, IGatewayClientContext, IUserContext, IGuildContext, IChannelContext, IContext
Inheritance
ModalInteractionContext
Implements
Inherited Members

Constructors

ModalInteractionContext(ModalInteraction, GatewayClient)

Context for handling modal interactions.

public ModalInteractionContext(ModalInteraction interaction, GatewayClient client)

Parameters

interaction ModalInteraction
The interaction that is being handled.
client GatewayClient
The GatewayClient associated with the handled command or interaction.

Properties

Channel

Channel in which the handled command or interaction was invoked.

public TextChannel Channel { get; }

Property Value

TextChannel

Client

The GatewayClient associated with the handled command or interaction.

public GatewayClient Client { get; }

Property Value

GatewayClient

Components

The components submitted with the modal.

public IReadOnlyList<IModalComponent> Components { get; }

Property Value

IReadOnlyList<IModalComponent>

Guild

Guild in which the handled command or interaction was invoked.

public Guild? Guild { get; }

Property Value

Guild

Remarks

May be null if the handled command or interaction was invoked outside of a guild or if the guild has not been cached.

User

User who invoked the handled command or interaction.

public User User { get; }

Property Value

User