Class SlashCommandInfo
Represents the info class of an attribute based method for command type Slash.
Inheritance
SlashCommandInfo
Assembly: Discord.Net.Interactions.dll
Syntax
public class SlashCommandInfo : CommandInfo<SlashCommandParameterInfo>, ICommandInfo, IApplicationCommandInfo
Properties
|
Improve this Doc
View Source
CommandType
Gets the type of this command.
Declaration
public ApplicationCommandType CommandType { get; }
Property Value
|
Improve this Doc
View Source
DefaultMemberPermissions
Gets the default permissions needed for executing this command.
Declaration
public GuildPermission? DefaultMemberPermissions { get; }
Property Value
|
Improve this Doc
View Source
DefaultPermission
Gets the DefaultPermission of this command.
Declaration
public bool DefaultPermission { get; }
Property Value
|
Improve this Doc
View Source
Description
Gets the command description that will be displayed on Discord.
Declaration
public string Description { get; }
Property Value
|
Improve this Doc
View Source
FlattenedParameters
Gets the flattened collection of command parameters and complex parameter fields.
Declaration
public IReadOnlyList<SlashCommandParameterInfo> FlattenedParameters { get; }
Property Value
|
Improve this Doc
View Source
IsEnabledInDm
Gets whether this command can be used in DMs.
Declaration
public bool IsEnabledInDm { get; }
Property Value
|
Improve this Doc
View Source
IsNsfw
Gets whether this command can is age restricted.
Declaration
public bool IsNsfw { get; }
Property Value
|
Improve this Doc
View Source
Parameters
Gets a collection of the parameters of this command.
Declaration
public override IReadOnlyList<SlashCommandParameterInfo> Parameters { get; }
Property Value
Overrides
Discord.Interactions.CommandInfo<Discord.Interactions.SlashCommandParameterInfo>.Parameters
|
Improve this Doc
View Source
SupportsWildCards
Gets whether this command supports wild card patterns.
Declaration
public override bool SupportsWildCards { get; }
Property Value
Overrides
Discord.Interactions.CommandInfo<Discord.Interactions.SlashCommandParameterInfo>.SupportsWildCards
Methods
|
Improve this Doc
View Source
ExecuteAsync(IInteractionContext, IServiceProvider)
Executes the command with the provided context.
Declaration
public override async Task<IResult> ExecuteAsync(IInteractionContext context, IServiceProvider services)
Parameters
Type |
Name |
Description |
IInteractionContext |
context |
The execution context.
|
IServiceProvider |
services |
Dependencies that will be used to create the module instance.
|
Returns
Type |
Description |
Task<IResult> |
A task representing the execution process. The task result contains the execution result.
|
Overrides
Discord.Interactions.CommandInfo<Discord.Interactions.SlashCommandParameterInfo>.ExecuteAsync(Discord.IInteractionContext, IServiceProvider)
|
Improve this Doc
View Source
GetLogString(IInteractionContext)
Declaration
protected override string GetLogString(IInteractionContext context)
Parameters
Returns
Overrides
Discord.Interactions.CommandInfo<Discord.Interactions.SlashCommandParameterInfo>.GetLogString(Discord.IInteractionContext)
|
Improve this Doc
View Source
InvokeModuleEvent(IInteractionContext, IResult)
Declaration
protected override Task InvokeModuleEvent(IInteractionContext context, IResult result)
Parameters
Returns
Overrides
Discord.Interactions.CommandInfo<Discord.Interactions.SlashCommandParameterInfo>.InvokeModuleEvent(Discord.IInteractionContext, Discord.Interactions.IResult)
|
Improve this Doc
View Source
ParseArgumentsAsync(IInteractionContext, IServiceProvider)
Declaration
protected override async Task<IResult> ParseArgumentsAsync(IInteractionContext context, IServiceProvider services)
Parameters
Returns
Overrides
Discord.Interactions.CommandInfo<Discord.Interactions.SlashCommandParameterInfo>.ParseArgumentsAsync(Discord.IInteractionContext, IServiceProvider)
Implements