- 1 :
/**
- 2 :
* Finalizers are functions that are ran after a Command has successfully been ran. Examples of these are
- 3 :
* cooldown setting after a command is ran and command logging.
- 4 :
* @module Finalizer
- 5 :
* @example <caption> They will always follow this structure. </caption>
- 6 :
* exports.run = (client, msg, mes) => { // code here };
- 7 :
* exports.conf = {};
- 8 :
*/
- 9 :
- 10 :
/**
- 11 :
* The part of the monitor that will run on the message.
- 12 :
* @param {KomadaClient} client The Komada Client
- 13 :
* @param {Message} msg A Message object obtained from discord.js
- 14 :
* @param {?} [mes] Something returned from the command for use in finalizers, like a message.
- 15 :
* @example <caption> This will create a finalizer that logs commands. </caption>
- 16 :
* exports.run = (client, msg, cmd) => {
- 17 :
* console.log(`Message ${msg.id} contained the command ${cmd.help.name} and was ran with the arguments ${msg.args.join(",")}`);
- 18 :
* }
- 19 :
*/
- 20 :
exports.run = (client, msg, mes) => {}; // eslint-disable-line
- 21 :
- 22 :
- 23 :
/**
- 24 :
* An Object containing configuration values that will configure a monitor.
- 25 :
* @typedef {Object} Conf
- 26 :
* @property {Boolean} enabled Whether or not this monitor should be enabled for use.
- 27 :
*/
- 28 :
- 29 :
- 30 :
/**
- 31 :
* An object that configures the monitor.
- 32 :
* @type {Conf}
- 33 :
* @example
- 34 :
* exports.conf = {
- 35 :
enabled: true,
- 36 :
};
- 37 :
*/
- 38 :
exports.conf = {};