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