Skip to main content
Version: 6.0.3

Introduction

aoijs

The official Documentation of the aoi.js NPM package.

NPM downloads AoiJS Server NPM version

Features

  • Built-in support of database by default and ready for multipurpose.
  • Built-in 630+ functions, simple and easy to learn.
  • Simple to learn, all in string-based and compact.
  • Support of extensions available to be used by the community.

Installation

node.js 16.9.0 or newer is required.

npm install aoi.js
yarn add aoi.js

Setup

const aoijs = require("aoi.js");

const bot = new aoijs.AoiClient({
token: "Discord Bot Token",
prefix: "Discord Bot Prefix",
intents: ["MessageContent", "Guilds", "GuildMessages"]
});

// Events, required for the bot to read and send messages.
bot.onMessage();

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

// Slash Interaction Command Example (ping)
/* You must execute the function below for the slash command to work:
$createApplicationCommand[$guildID;ping;Pong!;true;slash]
*/
bot.interactionCommand({
name: "ping",
prototype: "slash",
code: `$interactionReply[Pong! $pingms;;;;everyone]`
});

Disclaimer

aoi.js is not affiliated or associated with Discord or any other services.