📨Application Commands

Prototypes from ApplicationCommandManager

Getting a application command by ID

// discord.js
<Client>.application.commands.cache.get(string);

// djs-protofy
<Client>.application.commands.getById(string); // ApplicationCommand | undefined

Getting a application command by Name

// discord.js
<Client>.application.commands.cache.find(command => command?.name === string);

// djs-protofy
<Client>.application.commands.getByName(string); // ApplicationCommand | undefined
// OR
<Client>.application.commands.getByName(RegExp); // ApplicationCommand | undefined

Last updated