Skip to content

A package to help fetch and create functions with aoi.js

License

Notifications You must be signed in to change notification settings

USERSATOSHI/aoi.js-library

 
 

Repository files navigation

aoi.js-library

A plugin library for aoi.js that adds more functions to your aoi.js bot.

Installation

You can install the package using npm:

npm install aoi.js-library

Setup

const { AoiClient } = require("aoi.js");
const { PluginManager } = require("aoi.js-library");

const bot = new AoiClient({
    token: "DISCORD BOT TOKEN",
    prefix: "DISCORD BOT PREFIX",
    intents: ["MessageContent", "Guilds", "GuildMessages"],
    events: ["onMessage"],
    database: {
        type: "aoi.db",
        db: require("@akarui/aoi.db"),
        tables: ["main"],
        path: "./database/",
        extraOptions: {
            dbType: "KeyValue"
        }
    }
});

// Ping Command
bot.command({
    name: "ping",
    code: `Pong! $pingms`
});

new PluginManager(bot).loadPlugins("default/comment",); //Loads the from the default folder ($comment function)

Plugins

The Plugins class provides a way to load and manage plugins for your Discord bot.

To load plugins:

new PluginManager(bot).loadPlugins("author/function",);

To load specific plugins:

new PluginManager(bot).loadPlugins("default/comment",);

By adding this function in the field, it'll only enable $comment, it supports an multiple array if provided otherwise ignored.

Add your plugins to the library

To add your plugins to the library, you can add via Pull Request on the GitHub Repository.

About

A package to help fetch and create functions with aoi.js

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 86.4%
  • TypeScript 13.6%