Table of Contents

Class ContextCommandInfo

Namespace
Discord.Interactions
Assembly
Discord.Net.Interactions.dll

Base information class for attribute based context command handlers.

public abstract class ContextCommandInfo : CommandInfo<CommandParameterInfo>, ICommandInfo, IApplicationCommandInfo
Inheritance
ContextCommandInfo
Implements
Derived
Inherited Members

Properties

CommandType

Gets the type of this command.

public ApplicationCommandType CommandType { get; }

Property Value

ApplicationCommandType

ContextTypes

Gets the context types this command can be executed in.

public IReadOnlyCollection<InteractionContextType> ContextTypes { get; }

Property Value

IReadOnlyCollection<InteractionContextType>

DefaultMemberPermissions

Gets the default permissions needed for executing this command.

public GuildPermission? DefaultMemberPermissions { get; }

Property Value

GuildPermission?

DefaultPermission

Gets the DefaultPermission of this command.

public bool DefaultPermission { get; }

Property Value

bool

IgnoreGroupNames

Gets true if this command will be registered and executed as a standalone command, unaffected by the GroupAttributes of of the commands parents.

public override bool IgnoreGroupNames { get; }

Property Value

bool

IntegrationTypes

Gets the install methods for this command.

public IReadOnlyCollection<ApplicationIntegrationType> IntegrationTypes { get; }

Property Value

IReadOnlyCollection<ApplicationIntegrationType>

IsEnabledInDm

Gets whether this command can be used in DMs.

public bool IsEnabledInDm { get; }

Property Value

bool

IsNsfw

Gets whether this command can is age restricted.

public bool IsNsfw { get; }

Property Value

bool

Parameters

Gets a collection of the parameters of this command.

public override IReadOnlyList<CommandParameterInfo> Parameters { get; }

Property Value

IReadOnlyList<CommandParameterInfo>

SupportsWildCards

Gets whether this command supports wild card patterns.

public override bool SupportsWildCards { get; }

Property Value

bool

Methods

InvokeModuleEvent(IInteractionContext, IResult)

protected override Task InvokeModuleEvent(IInteractionContext context, IResult result)

Parameters

context IInteractionContext
result IResult

Returns

Task