mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 08:12:04 +02:00
32 lines
1010 B
JavaScript
32 lines
1010 B
JavaScript
const { Command } = require('discord.js-commando');
|
|
const roasts = require('./roasts.json');
|
|
|
|
module.exports = class RoastCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'roast',
|
|
aliases: [
|
|
'burn'
|
|
],
|
|
group: 'response',
|
|
memberName: 'roast',
|
|
description: 'Roasts the user of your choice. (x;roast @User)',
|
|
examples: ['x;roast @username'],
|
|
args: [{
|
|
key: 'thing',
|
|
prompt: 'What do you want to roast?',
|
|
type: 'string'
|
|
}]
|
|
});
|
|
}
|
|
|
|
run(message, args) {
|
|
if (message.channel.type !== 'dm') {
|
|
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
|
}
|
|
const { thing } = args;
|
|
const roast = roasts[Math.floor(Math.random() * roasts.length)];
|
|
return message.say(`${thing}, ${roast}`);
|
|
}
|
|
};
|