Haha-Yes/commands/owner/emit.js

31 lines
596 B
JavaScript
Raw Normal View History

2019-01-01 03:49:28 +01:00
const { Command } = require('discord-akairo');
class emitCommand extends Command {
2019-01-02 08:09:45 +01:00
constructor() {
super('emit', {
aliases: ['emit'],
category: 'owner',
ownerOnly: 'true',
args: [
{
id: 'event',
2019-11-15 21:39:53 +01:00
prompt: 'which event should i trigger?',
2019-01-14 11:41:15 +01:00
type: 'string',
match: 'rest'
2019-01-02 08:09:45 +01:00
}
],
description: {
2019-01-01 03:49:28 +01:00
content: 'Trigger an event',
usage: '[event]',
examples: ['ready']
}
2019-01-02 08:09:45 +01:00
});
}
2019-01-01 03:49:28 +01:00
2019-01-02 08:09:45 +01:00
async exec(message, args) {
this.client.emit(`${args.event}`);
return message.channel.send(`${args.event} has been emited!`);
}
2019-01-01 03:49:28 +01:00
}
module.exports = emitCommand;