Can now emit event

This commit is contained in:
Loic Bersier 2018-12-21 18:37:27 +01:00
parent 997acccd01
commit 0e91a42f4a

24
commands/owner/emit.js Normal file
View file

@ -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}`);
}
};