getApplicationCommandById

Returns the application command with the specific type, id, group and subcommand, or null if one of the expected arguments does not match.

Works for both global and guild commands.

Parameters

T

Expected type of the application command

commandId

Expected ID of the top-level command

group

Optional group name

subcommand

Optional subcommand name