Haha-Yes/commands/owner/emit.js

31 lines
760 B
JavaScript
Raw Normal View History

2019-01-01 03:49:28 +01:00
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;