2.0.0 • Published 4 years ago

cumsystem v2.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

Cumsystem

A simple and powerful Discord.JS command system

Usage

npm i cumsystem

or

npm i https://github.com/oatmealine/cumsystem

then

const CommandSystem = require('cumsystem');

or

import * as CommandSystem from 'cumsystem';

Example

const Discord = require('discord.js');
const CommandSystem = require('./cumsystem');

let client = new Discord.Client();
let cs = new CommandSystem.System(client, '!');

client.on('message', m => cs.parseMessage(m));
client.on('ready', () => console.log('ready!'));

cs.on('error', (err, msg, cmd) => {
	console.error(`got error while running ${cmd.name}:`);
	console.error(err);

	msg.channel.send(`got error!: ${err}\nyou should report this to the developer!`);
})

cs.addCommand(new CommandSystem.SimpleCommand('hi', () => {
  return 'hello!';
})
	.setCategory('core')
  .setDescription('says hello back'));

cs.addCommand(new CommandSystem.SimpleCommand('say', (msg, content) => {
  return content;
})
	.setCategory('core')
  .setDescription('says whatever you tell it to say')
  .setOwnerOnly());
	
client.login(token);

Documentation

TypeDoc

2.0.0

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago