aoijs / aoi.js

aoi.js - The most advanced string-based package to create a Discord Bot fast and powerful.
https://aoi.js.org
Apache License 2.0
329 stars 130 forks source link
aoi aoi-js aoijs bot bots callbacks discord discord-bot discord-js functions javascript music nodejs slash-commands

aoijs

The most powerful string package to create a simple and fast Discord Bot.


[![NPM downloads][download-image]][download-url]     [![AoiJS Server][aoijs-server]][aoijs-server-url]     [![NPM version][npm-image]][npm-url]     ![License](https://img.shields.io/npm/l/aoi.js)     ![Website](https://img.shields.io/website?url=https%3A%2F%2Faoi.js.org&label=aoi.js.org)     [npm-image]: https://img.shields.io/npm/v/aoi.js.svg?color=42cfff [npm-url]: https://npmjs.org/package/aoi.js [download-image]: https://img.shields.io/npm/dt/aoi.js.svg?color=3182b0 [download-url]: https://npmjs.org/package/aoi.js [aoijs-server]: https://img.shields.io/discord/773352845738115102?color=5865F2&logo=discord&logoColor=white [aoijs-server-url]: https://discord.gg/HMUfMXDQsV


**[ Documentation ](https://aoi.js.org/)** | **[ Support Server ](https://discord.gg/HMUfMXDQsV)** | **[ NPM ](https://npmjs.org/package/aoi.js)** | **[ GitHub ](https://github.com/aoijs/aoi.js)**

About

aoi.js is a JavaScript library that is designed to make it easy to build Discord bots.

It is open-source and free to use, and provides a simple, easy-to-use interface for interacting with the Discord API and handling events.

aoi.js is suitable for beginners who are new to building bots, as well as experienced developers who want to save time and streamline their workflow.

Features

Setup

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

const client = new AoiClient({
    intents: ["MessageContent", "Guilds", "GuildMessages"],
    events: ["onMessage", "onInteractionCreate"],
    prefix: "Discord Bot Prefix",
    token: "Discord Bot Token"
});

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

Adding Database

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

const client = new AoiClient({
    intents: ["MessageContent", "Guilds", "GuildMessages"],
    events: ["onMessage", "onInteractionCreate"],
    prefix: "Discord Bot Prefix",
    token: "Discord Bot Token",
    database: {
        type: "aoi.db",
        db: require("@aoijs/aoi.db"),
        dbType: "KeyValue",
        tables: ["main"],
        securityKey: "a-32-characters-long-string-here",
    }
});

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

Command Handler

By default, aoi.js does not have a command handler. However, you can easily add one by using the loadCommands method.

client.loadCommands("./commands/", true);

Notices

Official Extensions

@aoijs/aoi.panel @aoijs/aoi.music

Contributing

Refer to contribution documentation for more information