Changed arround some stuff
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const Logger = require('./logger');
|
||||
const Config = require('./config');
|
||||
const Commands = require('./commands/commands')
|
||||
const RuleCommands = require('./commands/rulecommands')
|
||||
const CommandManager = require('./main');
|
||||
const http = require('http');
|
||||
const ping = require('ping');
|
||||
@@ -12,7 +13,7 @@ var commands = {};
|
||||
module.exports.commands = commands;
|
||||
|
||||
function addCommand(name, command, alt, usage, desc, requrePerms, functionReference) {
|
||||
commands[name] = {
|
||||
commands[command] = {
|
||||
name: name,
|
||||
command: command,
|
||||
alt: alt,
|
||||
@@ -26,8 +27,15 @@ function addCommand(name, command, alt, usage, desc, requrePerms, functionRefere
|
||||
/*command name, command, alt, usage, description, require permission, reference*/
|
||||
module.exports.loadCommands = function() {
|
||||
//general commands
|
||||
addCommand('say', 'say', undefined, 'say [input]', 'repeats the input', false, Commands.say);
|
||||
addCommand('version', 'version', undefined, 'version', 'returns the version', false, Commands.version);
|
||||
addCommand('ping', 'ping', undefined, 'ping', 'returns round trip to discords serves', false, Commands.ping);
|
||||
//continue
|
||||
addCommand('Say', 'say', undefined, 'say [input]', 'repeats the input', false, Commands.say);
|
||||
addCommand('Version', 'version', undefined, 'version', 'returns the version', false, Commands.version);
|
||||
addCommand('Ping', 'ping', undefined, 'ping', 'returns round trip to discords servers', false, Commands.ping);
|
||||
|
||||
//rule commands
|
||||
addCommand('Rules', 'rules', undefined, 'rules', 'returns all the rules for the server the command was issued on', false, RuleCommands.rules);
|
||||
addCommand('Rule', 'rule', undefined, 'rule [rule number]', 'returns corresponding rule for the server the command was issued on', false, RuleCommands.rule);
|
||||
addCommand('AddRule', 'addrule', undefined, 'addrule [new rule]', 'adds a rule to the rule list for the server the command was issued on', true, RuleCommands.addrule);
|
||||
addCommand('DelRule', 'delrule', undefined, 'delrule [rule number]', 'deletes the corresponding rule for the server the command was issued on', true, RuleCommands.delrule);
|
||||
addCommand('EditRule', 'editrule', undefined, 'editrule [rune number] [new rule]', 'edits the corresponding rule for the server the command was issued on', true, RuleCommands.editrule);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user