📕
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

load

Loads a folder

PreviousFeaturesNextsetCooldown

Last updated 3 years ago

Was this helpful?

public async load<T>(dir: string, callback?: (file: T, fileName: string) => <unknown>)

  • dir: directory to load

  • callback: function executed when a file is loaded, file corresponds to the loaded file and fileName corresponds to the name of that file

client.load("src/my-stuff", (file, fileName) => {
console.log("Loaded file " + fileName)
})

Awaited