Changed not much
This commit is contained in:
@@ -27,19 +27,19 @@ function addCommand(name, command, alt, usage, desc, requrePerms, functionRefere
|
|||||||
/*command name, command, alt, usage, description, require permission, reference*/
|
/*command name, command, alt, usage, description, require permission, reference*/
|
||||||
module.exports.loadCommands = function() {
|
module.exports.loadCommands = function() {
|
||||||
//general commands
|
//general commands
|
||||||
addCommand('Help', 'help', undefined, 'help [command] or [help]', 'returns a usage chart for the command requested, or returns a link to a command list', false, Commands.help);
|
addCommand('Help', 'help', undefined, 'help [command] or [help]', 'Returns a usage chart for the command requested, or returns a link to a command list', false, Commands.help);
|
||||||
addCommand('Say', 'say', undefined, 'say [input]', 'repeats the input', false, Commands.say);
|
addCommand('Say', 'say', undefined, 'say [input]', 'Repeats the input', false, Commands.say);
|
||||||
addCommand('Version', 'version', undefined, 'version', 'returns the version', false, Commands.version);
|
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);
|
addCommand('Ping', 'ping', undefined, 'ping', 'Returns round trip to discords servers', false, Commands.ping);
|
||||||
addCommand('Cat', 'cat', undefined, 'cat', 'returns a picture of a cat', false, Commands.cat);
|
addCommand('Cat', 'cat', undefined, 'cat', 'Returns a picture of a cat', false, Commands.cat);
|
||||||
addCommand('Dog', 'dog', undefined, 'dog', 'returns a picture of a dog', false, Commands.dog);
|
addCommand('Dog', 'dog', undefined, 'dog', 'Returns a picture of a dog', false, Commands.dog);
|
||||||
addCommand('Undo', 'undo', undefined, 'undo', 'deletes last message sent by Jeffery from the channel the command was issued in', false, Commands.undo);
|
addCommand('Undo', 'undo', undefined, 'undo', 'Deletes last message sent by Jeffery from the channel the command was issued in', false, Commands.undo);
|
||||||
|
|
||||||
//rule commands
|
//rule commands
|
||||||
addCommand('Rules', 'rules', undefined, 'rules', 'returns all the rules for the server the command was issued on', false, RuleCommands.rules);
|
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('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('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('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 [rule number] [new rule]', 'edits the corresponding rule for the server the command was issued on', true, RuleCommands.editrule);
|
addCommand('EditRule', 'editrule', undefined, 'editrule [rule number] [new rule]', 'Edits the corresponding rule for the server the command was issued on', true, RuleCommands.editrule);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ module.exports.help = async function(message, msg, args, discordclient) {
|
|||||||
em.addField('Usage:', '\`' + commands[args[1]].usage + '\`');
|
em.addField('Usage:', '\`' + commands[args[1]].usage + '\`');
|
||||||
em.addField('Description:', commands[args[1]].desc);
|
em.addField('Description:', commands[args[1]].desc);
|
||||||
|
|
||||||
//console.log(commands[args[1]]);
|
|
||||||
message.channel.send(em)
|
message.channel.send(em)
|
||||||
} else {
|
} else {
|
||||||
message.channel.send(`:no_entry_sign: \`That command does not exist\``);
|
message.channel.send(`:no_entry_sign: \`That command does not exist\``);
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ module.exports.loadDefaults = function() {
|
|||||||
name: 'SERVER NAME',
|
name: 'SERVER NAME',
|
||||||
rules: ['RULE 0', 'RULE 1'],
|
rules: ['RULE 0', 'RULE 1'],
|
||||||
adminroles: ['123456789101112', '123456789101112']
|
adminroles: ['123456789101112', '123456789101112']
|
||||||
}
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports.loadFromFile = function() {
|
module.exports.loadFromFile = function() {
|
||||||
config = JSON.parse(fs.readFileSync('resources/config.json'));
|
config = JSON.parse(fs.readFileSync('resources/config.json'));
|
||||||
|
|||||||
Reference in New Issue
Block a user