Extendables allow you to "extend" native Discord.js classes with functions that you can use.
Example
exports.extend = function() { // code here };
exports.conf = {};
Members
-
static conf :Conf
-
An object that configures the extendable.
Example
exports.conf = { type: "method", method: "ping", appliesTo: ["Message"], komada: false };
Methods
-
static extend()
-
The part of the extendable that is added to the class.
Example
exports.extend = function() { return this.reply("Pong!"); // The keyword 'this' refers to a Message Object. }
Type Definitions
-
Conf
-
An Object containing configuration values that will configure an extendable.
Properties:
Name Type Description type
String Type of extendable. This will be one of the three: "method", "set", or "get". method
String The name of this extendable. appliesTo
Array An array of Discord.js classes that this extendable will apply to. komada
boolean Whether or not this extendable should apply to Komada or Discord.js