- Command handler: Define and manage commands for your bot using the
LoadCommandsmethod. 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.jsconst aoijs = require("aoi.js")
const bot = new aoijs.AoiClient({
token: "Discord Bot Token",
prefix: "Discord Bot Prefix",
intents: ["MessageContent", "Guilds", "GuildMessages"]
})
//Events
bot.onMessage()
//Command Example (ping)
bot.command({
name: "ping",
code: `Pong! $pingms`
})$authorID - Return the author ID/the userID who executed the functionaoi.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)