- Command handler: Define and manage commands for your bot using the
LoadCommands
method. Modify or add new functionality easily. - Utility functions: Save time and effort with ready-made solutions for common tasks such as sending messages and checking user permissions.
- Interactive commands: Allow users to interact with your bot using a special syntax in their messages. Flexible and natural interaction.
- Custom event handlers: Customize the behavior of your bot in response to different events, such as message updates and user joins.
node.js 16.9.0 or newer is required.
npm install aoi.js
yarn add aoi.js
const { AoiClient } = require("aoi.js")
const bot = new AoiClient({
token: "Discord Bot Token",
prefix: "Discord Bot Prefix",
intents: ["MessageContent", "Guilds", "GuildMessages"],
events: ["onMessage"]
})
//Ping Command Example
bot.command({
name: "ping",
code: `Pong! $pingms`
})
$authorID - Return the author ID/the userID who executed the function
aoi.js uses the $
symbol as a way to execute functions. To use a function, simply type $
followed by the function name and any additional fields (if required).
Events are an important part of creating Discord bots. aoi.js includes several events that allow you to customize the behavior of your bot in response to different situations.
For example, you can use the readyCommand
event to specify what should happen when the bot is ready and logged onto the API:
bot.readyCommand({ //Event Command
channel: "Channel ID", //The channel where the Client will log. (optional)
code: `Code to execute` //This can be a message or code to execute.
})
Use this on your precaution, we do not endorse anything or affiliated with, we only add support towards it.
Do you want to make your Discord Bot different from others, possibly with the ability to play/stream music, it's simple and easy to use!
$playTrack[type;name] - To play a track from the available third parties supported.
More information in our documentation
- @akarui/aoi.music to enable Music Functions compatibility. (
npm install @akarui/aoi.music
)