Table of Contents

Class ModuleInfo

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

Contains the information of a Interactions Module.

public class ModuleInfo
Inheritance
ModuleInfo
Inherited Members

Properties

Attributes

Gets a collection of the attributes of this module.

public IReadOnlyCollection<Attribute> Attributes { get; }

Property Value

IReadOnlyCollection<Attribute>

AutocompleteCommands

Gets the Autocomplete Commands that are declared in this module.

public IReadOnlyCollection<AutocompleteCommandInfo> AutocompleteCommands { get; }

Property Value

IReadOnlyCollection<AutocompleteCommandInfo>

CommandService

Gets the underlying command service.

public InteractionService CommandService { get; }

Property Value

InteractionService

ComponentCommands

Gets the Component Commands that are declared in this module.

public IReadOnlyCollection<ComponentCommandInfo> ComponentCommands { get; }

Property Value

IReadOnlyCollection<ComponentCommandInfo>

ContextCommands

Gets the Context Commands that are declared in this module.

public IReadOnlyList<ContextCommandInfo> ContextCommands { get; }

Property Value

IReadOnlyList<ContextCommandInfo>

ContextTypes

Gets the context types commands in this module 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 default Permission of this module.

[Obsolete("To be deprecated soon, use IsEnabledInDm and DefaultMemberPermissions instead.")]
public bool DefaultPermission { get; }

Property Value

bool

Description

Gets the description of this module if IsSlashGroup is true.

public string Description { get; }

Property Value

string

DontAutoRegister

Gets true if this module will not be registered by RegisterCommandsGloballyAsync(bool) or RegisterCommandsToGuildAsync(ulong, bool) methods.

public bool DontAutoRegister { get; }

Property Value

bool

IntegrationTypes

Gets the install method for commands in this module.

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 is age restricted.

public bool IsNsfw { get; }

Property Value

bool

IsSlashGroup

Gets true if this module is marked with a GroupAttribute.

public bool IsSlashGroup { get; }

Property Value

bool

IsSubModule

Gets true if this module is declared by another InteractionModuleBase<T>.

public bool IsSubModule { get; }

Property Value

bool

IsTopLevelGroup

Gets true if this module has a valid GroupAttribute and has no parent with a GroupAttribute.

public bool IsTopLevelGroup { get; }

Property Value

bool

ModalCommands

public IReadOnlyCollection<ModalCommandInfo> ModalCommands { get; }

Property Value

IReadOnlyCollection<ModalCommandInfo>

Name

Gets the name of this module class.

public string Name { get; }

Property Value

string

Parent

Gets the declaring type of this module, if IsSubModule is true.

public ModuleInfo Parent { get; }

Property Value

ModuleInfo

Preconditions

Gets a collection of the preconditions of this module.

public IReadOnlyCollection<PreconditionAttribute> Preconditions { get; }

Property Value

IReadOnlyCollection<PreconditionAttribute>

SlashCommands

Gets the Slash Commands that are declared in this module.

public IReadOnlyList<SlashCommandInfo> SlashCommands { get; }

Property Value

IReadOnlyList<SlashCommandInfo>

SlashGroupName

Gets the group name of this module, if the module is marked with a GroupAttribute.

public string SlashGroupName { get; }

Property Value

string

SubModules

Gets the collection of Sub Modules of this module.

public IReadOnlyList<ModuleInfo> SubModules { get; }

Property Value

IReadOnlyList<ModuleInfo>