From 4f1c830e060fa17876c55e98ef27c3a66b840160 Mon Sep 17 00:00:00 2001 From: Supositware Date: Tue, 1 Jan 2019 03:49:28 +0100 Subject: [PATCH] emit event --- commands/owner/emit.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 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..87d8b40 --- /dev/null +++ b/commands/owner/emit.js @@ -0,0 +1,31 @@ +const { Command } = require('discord-akairo'); + +class emitCommand extends Command { + constructor() { + super('emit', { + aliases: ['emit'], + split: 'none', + category: 'owner', + ownerOnly: 'true', + args: [ + { + id: 'event', + prompt: 'Wich event should i trigger?', + type: 'string' + } + ], + description: { + content: 'Trigger an event', + usage: '[event]', + examples: ['ready'] + } + }); + } + + async exec(message, args) { + this.client.emit(`${args.event}`); + return message.channel.send(`${args.event} has been emited!`) + } +} + +module.exports = emitCommand; \ No newline at end of file