Skip to content

Instantly share code, notes, and snippets.

@angeloanan
Created May 3, 2022 13:47
Show Gist options
  • Save angeloanan/eb6438547d2dae10eb66f34d60d20f5c to your computer and use it in GitHub Desktop.
Save angeloanan/eb6438547d2dae10eb66f34d60d20f5c to your computer and use it in GitHub Desktop.
Dragory ModMailBot's Custom Plugin Templates (with type checking via JSDoc!)
// @ts-check
/**
* @typedef ModmailPlugin
* @type {object}
* @property {import('eris').Client} bot
* @property {import('knex')} knex
* @property {object} config
* @property {object} commands
*/
/**
* Main entry point of the plugin
*
* @param {ModmailPlugin} param0
*/
module.exports = function({ bot, knex, config, commands }) {
/**
* @param {import('eris').Message} message []
*/
const handleMessage = async (message) => {}
bot.on('messageCreate', handleMessage)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment