Skip to content

Latest commit

 

History

History
86 lines (66 loc) · 2.03 KB

README.md

File metadata and controls

86 lines (66 loc) · 2.03 KB
description
This page will help begin your New Bot!

Begin

Installing Aoi.js

npm i aoi.js

:warning: Installing Aoi.JS can be different depending on your host. Please check #video-tutorials for exact guides.

Your main file

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\`` 
})

Package.json

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"
    }
  }

:warning: To update Aoi.JS, change the version number to latest via #changelog

Basic Command Format

bot.command({
      name: "name",
      code: `your code/message`
})

Simple Status

bot.status({
      text: "aoi.js",
      type: "PLAYING",
      time: 12
})

:warning: 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!