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
ulongThe 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
stringThe name of the command to get.
withLocalizations
boolWhether to include localizations in the response.
Returns
- Task<DiscordApplicationCommand>
The command with the name. This is null when the command is not found