1.2.6 • Published 7 years ago

ares.js v1.2.6

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

ares.js

An easy-to-use, Discord.js bot framework, based on ES6 classes.

Installation

This depends on Node.js version 8.0.0, and up! npm install ares.js

Basic Usage

First, require the module.

const Ares = require('ares.js');

Then, create the new client.

const Ares = require('ares.js');
const client = new Ares.Client({
   prefix: '>',
   ownerID: '4839247484875758449'
});

The object takes a few options.

prefix: The command prefix for the bot. This may be changed later in the prefix command.

selfbot: Whether to run Ares.js in selfbot mode. If excluded, defaults to false.

disabledServers (Only for selfbots): Servers that the selfbot will not be running on.

ownerID: The owner of the bot. This can be one or an array of IDs.

Then, if you would like to use the default commands (help, eval, ping, etc...), just add the following:

client.registerDefaults();

Next, register your command directory.

client.registerCommands();

Then, to start the bot, simply call login(), like normal, with your token.

client.login(token);

Creating Commands

To create a command, just simply require the command class from the main file.

const { Command } = require('ares.js');

The, extend that class with a class name of your choice. Then, add the constructor and super, which will hold your command options.

class ClassNameHere extends Command {
   constructor(client) {
      super(client, {
          name: 'commandname',
          description: 'Your description',
          usage: 'usage here',
          aliases: ['aliases', 'here']
      })
      
    }
    
    run (message, args) {
       //your code here
    }

In the run function, your command code will be typed there. And that's all!

1.2.6

7 years ago

1.2.52

7 years ago

1.2.51

7 years ago

1.2.5

7 years ago

1.2.34

7 years ago

1.2.33

7 years ago

1.2.32

7 years ago

1.2.31

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.4

7 years ago

1.1.33

7 years ago

1.1.32

7 years ago

1.1.317

7 years ago

1.1.316

7 years ago

1.1.315

7 years ago

1.1.314

7 years ago

1.1.313

7 years ago

1.1.312

7 years ago

1.1.311

7 years ago

1.1.31

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.33

7 years ago

1.0.32

7 years ago

1.0.31

7 years ago

1.0.30

7 years ago

1.0.29

7 years ago

1.0.28

7 years ago

1.0.27

7 years ago

1.0.26

7 years ago

1.0.25

7 years ago

1.0.24

7 years ago

1.0.23

7 years ago

1.0.22

7 years ago

1.0.21

7 years ago

1.0.20

7 years ago

1.0.19

7 years ago

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago