This repository has been archived on 2024-01-30. You can view files and clone it, but cannot push or open issues or pull requests.
anitrox/commands/cheese.js

41 lines
1.3 KiB
JavaScript

const { ApplicationCommandOptionType } = require('discord.js');
module.exports = {
name: require('path').parse(__filename).name,
description: 'Cheese a user, or run with no arguments for a surprise :eyes:',
options: [{
name: 'user',
description: 'The user to cheese',
required: false,
type: ApplicationCommandOptionType.User
}],
async parseMessage (client, config, message) {
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
},
handle (_, config, user, target) {
if (!target) return '*slams cheese on desk*\n**Cheese.** https://www.youtube.com/watch?v=Or4IE8fkpn4';
return {
embeds: [{
title: ':cheese: Cheesed',
description: `${target} You have been cheesed by ${user}!`,
color: 16312092,
footer: {
icon_url: user.displayAvatarURL(),
text: config.footerTxt
},
image: {
url: 'https://cdn.discordapp.com/attachments/803658122299572255/812867714368536636/R06325af354168febcafd96b8328b7590.png'
}
}]
};
}
};