UNPKG

catt.js

Version:
49 lines (45 loc) 950 B
class Plugins { constructor(args) { this.args = args; if (!args.bot) { console.log("Error Exiting"); process.exit(0); } } loadPlugins() { const bot = this.args.bot; bot.functionManager.createFunction({ name: "$welcmsg", code: async d => { return { code: "<@$userID> $randomText[Hiya;Heyo;Hi!], welcome to $serverName" } } }); bot.functionManager.createFunction({ name: "$badword", code: async d => { return { code: "soon" } } }); bot.functionManager.createFunction({ name: "$dog", type: "djs", code: async d => { const randomCat = require('random-cat-img'); (async () => { const res = await randomCat(); console.log(res.data); })(); return { code: `${res.data}` } } }); } } module.exports = { Plugins }