Haha-Yes/commands/utility/feedback.js

25 lines
815 B
JavaScript
Raw Normal View History

2018-09-27 15:22:36 +02:00
const { Command } = require('discord.js-commando');
const { feedbackChannel } = require('../../config.json');
2018-10-01 16:17:33 +02:00
module.exports = class feedbackCommand extends Command {
2018-09-27 15:22:36 +02:00
constructor(client) {
super(client, {
name: 'feedback',
group: 'utility',
memberName: 'feedback',
description: `Send feedback`,
args: [
{
key: 'text',
2018-09-27 15:33:22 +02:00
prompt: 'What would you want to send as feedback?',
2018-09-27 15:22:36 +02:00
type: 'string',
}
]
});
}
async run(message, { text }) {
const channel = this.client.channels.get(feedbackChannel);
channel.send(`from ${message.author}: ${text}`);
2018-09-27 15:33:22 +02:00
message.say('Your feedback has been sent!');
2018-09-27 15:22:36 +02:00
}
};