Table of Contents

Method GetApplicationCommandAsync

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

GetApplicationCommandAsync(ulong)

Gets a application command in this guild by its id.

public Task<DiscordApplicationCommand> GetApplicationCommandAsync(ulong commandId)

Parameters

commandId ulong

The ID of the command to get.

Returns

Task<DiscordApplicationCommand>

The command with the ID.

GetApplicationCommandAsync(string, bool)

Gets a application command in this guild by its name.

public Task<DiscordApplicationCommand?> GetApplicationCommandAsync(string commandName, bool withLocalizations = false)

Parameters

commandName string

The name of the command to get.

withLocalizations bool

Whether to include localizations in the response.

Returns

Task<DiscordApplicationCommand>

The command with the name. This is null when the command is not found