2.2.0 • Published 5 years ago

george-bomb v2.2.0

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

George-Bomb

George Bomb is a command handler for eris, it's made to be as easy and straighforward as possible!

Example

const { token } = require('./config.json')
const George = require('george-bomb')

// Initialises a George istance
const bot = new George({
  prefix: ['!', '?'],       //  What's your bot's prefix?
  token: "Your token here",
  botProtection: true,      //  can other bots use your bot?
  author: "Your ID here",
  blacklist: ['IDs of', 'very mean', 'users here!'],
  serverBlacklist: ['IDs of bad servers here!'],
  whitelist: ["Who can use your bot's id here"], // If you make one, the bot will interact only with the users who are in this list
  serverWhitelist: ["Servers' IDs here!"], // If you make one, the bot will work only on this servers!
  timeout: 2500 // Milliseconds inbetween any interaction with a user
})

// Adds a command
bot.addCommand( 'ping', (msg, args) => {
  msg.channel.createMessage('This is your first arg: ' + args[0])
})

Separating each command into its own file

When you initialise an istance of george bomb, it will seek the commands folder and the callbacks folder, and it will add the files in them as commands

Commands folder

  1. Make a folder called commands in your project folder
  2. Make a file called com-<command-name>.js
  3. Code stuff into it, remembering that every command has two arguments, the message argument and an array containing all the provided arguments, each one separated by a space. to see how a file has to be structured, see the example file.
  4. Have fun!
2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago

0.1.0

5 years ago