description |
---|
This page will help begin your New Bot! |
npm i aoi.js
Installing Aoi.JS can be different depending on your host. Please check #video-tutorials for exact guides.
Main file will allow the bot to be ran, and commands to be kept. This can be named server.js, index.js or whatever you want.
const Aoijs = require("aoi.js")
const bot = new Aoijs.Bot({
sharding: false, //true or false
shardAmount: 2, //Shard amount
mobile: false, //true or false - Discord Mobile Status
//dbhToken: "API KEY", Remove // if using, get an API Key from their Server
token: "TOKEN", //Discord Bot Token
prefix: ["PREFIX"], //Change PREFIX to your Prefix
autoUpdate: false // set to true if version should be updated automatically after a package update
})
bot.onMessage() // Allows Commands to Executed
bot.command({
name: "ping",
code: `Pong! \`$ping\``
})
The file where your project can "get" aoi.js
{
"name": "-asdf",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"engines": {
"node": "12.x"
},
"author": "",
"license": "ISC",
"dependencies": {
"aoi.js": "^4.0.2"
}
}
To update Aoi.JS, change the version number to latest via #changelog
bot.command({
name: "name",
code: `your code/message`
})
bot.status({
text: "aoi.js",
type: "PLAYING",
time: 12
})
If you are using glitch or repl.it. Do not use
npm i aoi.js
If you add package.json, It will install the package automatically!