new command format
This commit is contained in:
parent
a5c7aaef5f
commit
b898f170e7
2 changed files with 22 additions and 23 deletions
|
@ -1,23 +0,0 @@
|
|||
class Command {
|
||||
|
||||
constructor (client, {
|
||||
name = null,
|
||||
description = 'No description provided.',
|
||||
category = 'Miscellaneous',
|
||||
usage = 'No usage provided.',
|
||||
parameters = '',
|
||||
examples = '',
|
||||
enabled = true,
|
||||
guildOnly = false,
|
||||
devOnly = false,
|
||||
aliases = new Array(),
|
||||
userPerms = new Array(),
|
||||
botPerms = new Array (),
|
||||
cooldown = 2000
|
||||
}) {
|
||||
this.client = client;
|
||||
this.conf = { enabled, guildOnly, devOnly, aliases, userPerms, botPerms, cooldown };
|
||||
this.help = { name, description, category, usage, parameters, examples };
|
||||
}
|
||||
}
|
||||
module.exports = Command;
|
22
bot/commands/Test/hello.js
Normal file
22
bot/commands/Test/hello.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
module.exports = class {
|
||||
constructor (name, category) {
|
||||
this.name = name,
|
||||
this.category = category,
|
||||
this.enabled = true,
|
||||
this.guildOnly = false,
|
||||
this.devOnly = false,
|
||||
this.aliases = [],
|
||||
this.userPerms = [],
|
||||
this.botPerms = [],
|
||||
this.cooldown = 2000,
|
||||
this.help = {
|
||||
description: 'Say hi!',
|
||||
usage: 'hello',
|
||||
examples: null
|
||||
};
|
||||
}
|
||||
|
||||
run (client, message, args, data) { // eslint-disable-line no-unused-vars
|
||||
return client.createMessage(message.channel.id, `Hello, ${message.author}!`);
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue