DiscordFeaturesHandler Setup
Dive into the specifics details of each parameters and properties.
Usage
Here is a sample usage with the all properties and parameters.
client
The constructor from discord.js client object.
You can refer to Discord.js documentation for more information
DiscordFeaturesHandlerOptions
An options object that contains properties to configure DiscordFeaturesHandler how you want it and to get your discord.js bot up and running.
config
The path and filename to your config.js file. Please refer to config.js to see file setup and customization. If empty will use a default config file seen in config.js.
Type: ?string
directories
The object containing the folder names and main directory path. main property is required
Type: object
builtin_files
This object contains properties of true or false values of what built-in commands and events to disable
Type: object
onLoad_list_files
This object contains properties of true or false values of what built-in commands and events to disable
Type: object
disableUnhandledRejectionHandler
An Boolean to disable the pre-defined unhandledRejection function to handled uncaught promise rejection, in where bot would not crash upon reaching the rejection.
Recommend disabling only to use if you are re-creating this handler to print out the error tailored to read. Otherwise your bot may crash more often.
Type: Boolean
Default: false
modulesPreloadTime
The time to wait before loading modules files. This is used to establish a waiting time to connect to the Discord API and ensure we can access the guilds the bot has access to and their Discord Channels, users, guild information to use within the module files that are waiting to be loaded. The time value is in milliseconds, and by default the wait time is 5000 ms or 5 seconds before modules file is loaded. You can update the time if you required a longer wait time other APi related such as connecting to a database or 0 ms if not required.
Type: Number
Default: 5000
filesToExcludeInHandlers
An object that contains properties of handler name for the array of string. The strings of files that should not run when bot starts up
Type: Object
Last updated