Aoi.js is a npm package that simplifies coding discord bots.
Made By Leref#0001.
Recomended host: replit.
Language: Javascript [Node.js / Bash]
Required Packages: Aoi.js (npm i aoi.js
), Express (npm i express
), Fs (npm i fs
).
Start: npx node index.js
or node index.js
.
Credits: Leref for the aoi.js v5 on replit.
- Go to
config.json
. - Under
bot_prefix
add your bot prefix. - Under
bot_description
add your bot description. (Basically info which will show on the website.) - Under
icon
add your bots avatar link (.jpg or .png format!) - In your
.env
under the name "TOKEN" add your bot token. - Run the code.
- Go to
callbacks.json
.
{
"callbacks":["bot.onMessage()","bot.onInteractionCreate()"]
}
- In "callbacks" json, add your callbacks. For more details go to the documentation.
- Go to
/status/
. - Add your status code in new file/replace the old status codes. For eg:
module.exports=({
text:"Hello World!",//text in the status
type:"PLAYING",// types: PLAYING,LISTENING,COMPETING, e.t.c.
time:"12"// time is should show the status for. (not needed unless multiple statuses are being used.)
})
- Go to
vars.js
.
module.exports={
dev:"Bumblebee",
/*
Adding Variables: to add variables just do `<variable name> : "<variable value>",`
*/
}
- Add
(variable name):"(variable value)",
- Go to
./commands/message commands/
folder. - Create a new js file. eg: "ban.js"
- Add your code there. For eg:
module.exports ={
name:"ban",//command name
aliases:["bon"],//command alias
code:`
$title[1;BONNED!!]
$description[1;banned $userTag[$mentioned[1]]]
$ban[$mentioned[1];Banned By $userTag[$authorID]]`//code
}
- Go to
slash.json
file. - Add your slash command code there. For more info read the docs here.
- Example:
{
"slash":["$createApplicationCommand[858378652235071498;ping;ping pong ding dong🏓;true]","$createApplicationCommand[858378652235071498;hi;Say hi!;true]"]
}
- Go to
./commands/slash commands/
folder. - Create a new js file. eg: "hi.js"
- Add your code there. For eg:
module.exports = ({
name: "hi",
type: "interaction",
prototype: "slash",
code: `$interactionReply[Hi <@$interactionData[author.id]> !;{newEmbed:{title:Hello!}{description:Hey man! Wassup?!}}]`
})
Website Code is in ./website/dash.js
.
You can change the code in variable "a".
npm init -y && npm i --save-dev node@16 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH
- Add Slash Commands Handler.
- Add A Basic Website.
- Added Status Handler