A Klasa Plugin which adds Functions Store to your Klasa Bot
-
Install the plugin.
npm i QuantumPlugin/klasa-functions-plugin -
Use
klasa-functionsin your client.const { Client } = require("klasa"); Client.use(require("klasa-functions"); new Client({ aliasFunctions: { returnRun: true, prefix: "funcs", enabled: true } }).login("Your Beautiful Token");
-
Create a new
functionin yourfunctionsfolder with the name you want to access later, for exampletest.js.const { Function } = require("klasa-functions"); module.exports = class extends Function { run(){ // Your Code Here } }
-
Use these functions in your bot.
this.client.funcs.test();
-
Done!
MIT