From 0e91a42f4a1aee6cf7aae212bb282e5a42f9f21e Mon Sep 17 00:00:00 2001 From: Loic Bersier Date: Fri, 21 Dec 2018 18:37:27 +0100 Subject: [PATCH] Can now emit event --- commands/owner/emit.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 commands/owner/emit.js diff --git a/commands/owner/emit.js b/commands/owner/emit.js new file mode 100644 index 0000000..222b315 --- /dev/null +++ b/commands/owner/emit.js @@ -0,0 +1,24 @@ +const { Command } = require('discord.js-commando'); +module.exports = class dmCommand extends Command { + constructor(client) { + super(client, { + name: 'emit', + group: 'owner', + memberName: 'emit', + aliases: ['event', 'emitevent'], + description: 'Trigger an event', + ownerOnly: true, + args: [ + { + key: 'event', + prompt: 'Wich event do you want to trigger?', + type: 'string', + } + ] + }); + } + + async run(message, { event }) { + this.client.emit(`${event}`); + } +}; \ No newline at end of file