Created
May 3, 2022 13:47
-
-
Save angeloanan/eb6438547d2dae10eb66f34d60d20f5c to your computer and use it in GitHub Desktop.
Dragory ModMailBot's Custom Plugin Templates (with type checking via JSDoc!)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @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