From b898f170e797208d7af5e34b82f289a779e9ba16 Mon Sep 17 00:00:00 2001 From: Emily J Date: Wed, 21 Oct 2020 11:38:40 +1100 Subject: [PATCH] new command format --- bot/base/Command.js | 23 ----------------------- bot/commands/Test/hello.js | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 23 deletions(-) delete mode 100644 bot/base/Command.js create mode 100644 bot/commands/Test/hello.js diff --git a/bot/base/Command.js b/bot/base/Command.js deleted file mode 100644 index cd4833b..0000000 --- a/bot/base/Command.js +++ /dev/null @@ -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; diff --git a/bot/commands/Test/hello.js b/bot/commands/Test/hello.js new file mode 100644 index 0000000..5a8bc2c --- /dev/null +++ b/bot/commands/Test/hello.js @@ -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}!`); + } +}; \ No newline at end of file