Class ModuleInfo
Contains the information of a Interactions Module.
Namespace: Discord.Interactions
Assembly: Discord.Net.Interactions.dll
Syntax
public class ModuleInfo : object
Properties
| Improve this Doc View SourceAttributes
Gets a collection of the attributes of this module.
Declaration
public IReadOnlyCollection<Attribute> Attributes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<Attribute> |
AutocompleteCommands
Gets the Autocomplete Commands that are declared in this module.
Declaration
public IReadOnlyCollection<AutocompleteCommandInfo> AutocompleteCommands { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<AutocompleteCommandInfo> |
CommandService
Gets the underlying command service.
Declaration
public InteractionService CommandService { get; }
Property Value
Type | Description |
---|---|
InteractionService |
ComponentCommands
Gets the Component Commands that are declared in this module.
Declaration
public IReadOnlyCollection<ComponentCommandInfo> ComponentCommands { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<ComponentCommandInfo> |
ContextCommands
Gets the Context Commands that are declared in this module.
Declaration
public IReadOnlyList<ContextCommandInfo> ContextCommands { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<ContextCommandInfo> |
DefaultMemberPermissions
Gets the default permissions needed for executing this command.
Declaration
public GuildPermission? DefaultMemberPermissions { get; }
Property Value
Type | Description |
---|---|
Nullable<GuildPermission> |
DefaultPermission
Gets the default Permission of this module.
Declaration
public bool DefaultPermission { get; }
Property Value
Type | Description |
---|---|
Boolean |
Description
Gets the description of this module if IsSlashGroup is true.
Declaration
public string Description { get; }
Property Value
Type | Description |
---|---|
String |
DontAutoRegister
Gets true if this module will not be registered by RegisterCommandsGloballyAsync(Boolean) or RegisterCommandsToGuildAsync(UInt64, Boolean) methods.
Declaration
public bool DontAutoRegister { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsEnabledInDm
Gets whether this command can be used in DMs.
Declaration
public bool IsEnabledInDm { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsNsfw
Gets whether this command is age restricted.
Declaration
public bool IsNsfw { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsSlashGroup
Gets true if this module is marked with a GroupAttribute.
Declaration
public bool IsSlashGroup { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsSubModule
Gets true if this module is declared by another InteractionModuleBase<T>.
Declaration
public bool IsSubModule { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsTopLevelGroup
Gets true if this module has a valid GroupAttribute and has no parent with a GroupAttribute.
Declaration
public bool IsTopLevelGroup { get; }
Property Value
Type | Description |
---|---|
Boolean |
ModalCommands
Declaration
public IReadOnlyCollection<ModalCommandInfo> ModalCommands { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<ModalCommandInfo> |
Name
Gets the name of this module class.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
String |
Parent
Gets the declaring type of this module, if IsSubModule is true.
Declaration
public ModuleInfo Parent { get; }
Property Value
Type | Description |
---|---|
ModuleInfo |
Preconditions
Gets a collection of the preconditions of this module.
Declaration
public IReadOnlyCollection<PreconditionAttribute> Preconditions { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<PreconditionAttribute> |
SlashCommands
Gets the Slash Commands that are declared in this module.
Declaration
public IReadOnlyList<SlashCommandInfo> SlashCommands { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<SlashCommandInfo> |
SlashGroupName
Gets the group name of this module, if the module is marked with a GroupAttribute.
Declaration
public string SlashGroupName { get; }
Property Value
Type | Description |
---|---|
String |
SubModules
Gets the collection of Sub Modules of this module.
Declaration
public IReadOnlyList<ModuleInfo> SubModules { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<ModuleInfo> |