# FileLoader Class

Lists Event and Commands by reading the folder.

Properties
Events
  • files
  • startedAt
  • error
  • finish
  • load

# Import

import { FileLoader } from 'discordkit';
const { FileLoader } = require('discordkit');

# Constructor

new FileLoader<T>(path: string);

# Properties

# .files

List of files in the folder.
Type: T[]


# .startedAt

The time when the folder was started to be read.
Type: number


# Events

# error

It is triggered when an error occurs while reading the folder.

Parameter Type Description
err Error Error.

# finish

It is triggered when the process of reading the folder is finished.

Parameter Type Description
time number Reading time.

# load

It is triggered when a file is read.

Parameter Type Description
file T Default export of file.