Haha-Yes/commands/utility/feedback.js

33 lines
942 B
JavaScript
Raw Normal View History

2018-12-30 01:20:24 +01:00
const { Command } = require('discord-akairo');
2018-09-27 15:22:36 +02:00
const { feedbackChannel } = require('../../config.json');
2018-12-25 19:17:07 +01:00
2018-12-30 01:20:24 +01:00
class FeedbackCommand extends Command {
constructor() {
super('feedback', {
aliases: ['feedback'],
category: 'utility',
split: 'none',
2018-09-27 15:22:36 +02:00
args: [
{
2018-12-30 01:20:24 +01:00
id: "text",
type: "string"
2018-09-27 15:22:36 +02:00
}
2018-12-30 01:20:24 +01:00
],
description: {
content: 'Send feedback to the bot owner',
usage: '[What do you want to say]',
examples: ['Hello, i just wanted to say hi!']
}
2018-09-27 15:22:36 +02:00
});
}
2018-12-30 01:20:24 +01:00
async exec(message,args) {
let text = args.text;
2018-09-27 15:22:36 +02:00
const channel = this.client.channels.get(feedbackChannel);
2018-11-03 02:09:48 +01:00
channel.send(`from ${message.author.username} (${message.author.id}) : ${text}`);
2018-12-30 01:20:24 +01:00
message.channel.send('Your feedback has been sent!');
2018-10-02 19:48:49 +02:00
}
2018-12-30 01:20:24 +01:00
}
module.exports = FeedbackCommand;