📕
AFKHandler
  • Introduction
  • FAQ
  • Changelog
  • Classes
    • AFKHandler
    • Command
    • SlashCommand
    • Event
    • Feature
  • Methods
    • Commands
    • SlashCommands
    • deleteSlash
    • Events
    • Features
    • load
    • setCooldown
    • time
    • convert
    • convertLong
  • Types
  • AFKHandlerInteraface
  • AFKHandlerOptions
  • CommandInterface
  • SlashCommandInterface
  • EventInterface
  • FeatureInterface
  • CommandHelp
  • (Callbacks)
  • (Utils)
Powered by GitBook
On this page

Was this helpful?

  1. Methods

SlashCommands

Loads SlashCommands

PreviousCommandsNextdeleteSlash

Last updated 3 years ago

Was this helpful?

public async SlashCommands(dir: string, callback?: (slashCommand: <{ guild: ; }> | <{}>,, fileName: string) => <unknown>)): Promise<>

  • 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)
  );
ApplicationCommand
GuildResolvable
ApplicationCommand
Awaited
this