Getting Started
Aoi.handler is a package built for aoi.js to make it easy for users to load their command, events, custom functions and statuses.
Features
- Pretty console logging
- Easy handler structure
- Customizable borders and colors
Setup
To setup aoi.handler follow this
npm install aoi.js-handler
pnpm install aoi.js-handler
yarn add aoi.js-handler
bun add aoi.js-handler
// Import necessary modulesconst { AoiClient } = require("aoi.js");const { Handler } = require("aoi.js-handler")
// Create a new AoiClient instanceconst client = new AoiClient({ token: "Discord Bot Token", prefix: "Discord Bot Prefix", intents: ["MessageContent", "Guilds", "GuildMessages"], events: ["onMessage", "onInteractionCreate"], database: { type: "aoi.db", db: require("@akarui/aoi.db"), dbType: "KeyValue", tables: ["main"], securityKey: "a-32-characters-long-string-here", }});
// Initialize a Handler for structured command handlingconst handler = new Handler( { client: client, readyLog: true }, { // Additional Handler configuration options go here }, __dirname);
// Module is now ready for use