25

Github GitHub - aoijs/aoi.js: Aoi.js - Library that simplifies coding for develo...

 3 years ago
source link: https://github.com/aoijs/aoi.js
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Aoi.JS

Table Of Contents

About

Aoi.JS is a package that aim to allows you to make your Discord Bots with Ease.

Aiming to be the easiest package to learn
It's swift and flexible using functions

Examples

Setup

const Aoijs = require("aoi.js")

const bot = new Aoijs.Bot({
token: "TOKEN", //Discord Bot Token
prefix: "!" //Customizable
})
bot.onMessage() //Allows to run Commands

bot.command({
name: "ping", //Trigger name (command name)
code: `$ping Pong!` //Code
})

Variables

What are variables?

Variables are Key-Value based data which is stored in the database, useful for Economy and Leveling system as it is allows you to save data.

bot.variables({
  VariableName1: "Value", //Returns "Value"
  VariableName2: "Value2" //Returns "Value2"
})

Callbacks

What are callbacks?

It's simple and easy process, it essentially allows you to trigger events, such as user joining a Guild. This will trigger an event, causing commands with supported type for each callbacks to be executed such as.

bot.joinCommand({
        channel: "Channel ID", //Enter a Channel ID
        code: `<@$authorID> just joined, welcome!` //This can be changed
})
bot.onJoined()

Additional Support

Slash Commands

With easy and simple functions, you can make Slash Commands with your Bots quick!

bot.command({
    name: "slash",
    code: `$createSlashCommand[$guildID;version;Returns Aoi.js Version]`
})
bot.interactionCommand({
    name: "version", 
    code: `$interactionReply[$packageVersion]`
})
bot.onInteractionCreate()

More Information in our Documentation

Music

With our powerful Package, we incorporated Music with several functions. We allowed customization and control over what you want.

Music Setup Example

bot.command({
name: "play", //Trigger name (command name)
code: `$playSong[song;leave vc time;defean (yes or no);leave when vc empty (yes/no);error]`
//Code
})

More Information in our Documentation

Links

Aoi.JS was made by Aoi.JS Team

Contributing

Please read Contributing


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK