SlashCommands
Loads SlashCommands
public async SlashCommands(dir: string, callback?: (slashCommand: ApplicationCommand<{ guild: GuildResolvable; }> | ApplicationCommand<{}>,, fileName: string) => Awaited<unknown>)): Promise<this>
dir: slashCommands directory
callback: function executed when a slash command is created / updated
client.SlashCommands(
"src/slash-commands",
(cmd, file)
=> console.log("Loading slash command " + cmd.name)
);
Last updated
Was this helpful?