2022-12-06 21:06:39 -06:00
|
|
|
const { ApplicationCommandOptionType } = require('discord.js');
|
2022-04-21 20:53:03 -05:00
|
|
|
|
2022-03-26 03:33:18 -05:00
|
|
|
const gifchoices = [
|
2022-04-21 18:09:21 -05:00
|
|
|
'https://i.pinimg.com/originals/4d/89/d7/4d89d7f963b41a416ec8a55230dab31b.gif',
|
|
|
|
'https://media1.tenor.com/images/6d73b0a9cadef5310be4b6160d2f959a/tenor.gif?itemid=12099823',
|
|
|
|
'https://media.tenor.com/images/2636cf3c8152631b4630bf71757a4afa/tenor.gif',
|
|
|
|
'https://i.imgur.com/JiFpT5E.gif'
|
2022-03-26 03:33:18 -05:00
|
|
|
];
|
2021-01-19 18:00:32 -06:00
|
|
|
|
2022-03-26 03:33:18 -05:00
|
|
|
module.exports = {
|
2021-01-26 14:03:02 -06:00
|
|
|
|
2022-04-18 11:25:40 -05:00
|
|
|
name: require('path').parse(__filename).name,
|
2022-04-21 18:09:21 -05:00
|
|
|
description: 'Cuddle a user!',
|
2022-04-21 20:53:03 -05:00
|
|
|
options: [{
|
|
|
|
name: 'user',
|
|
|
|
description: 'The user to cuddle',
|
|
|
|
required: true,
|
2022-12-06 21:06:39 -06:00
|
|
|
type: ApplicationCommandOptionType.User
|
2022-04-21 20:53:03 -05:00
|
|
|
}],
|
2021-01-23 01:08:05 -06:00
|
|
|
|
2022-04-21 23:44:02 -05:00
|
|
|
async parseMessage (client, config, message) {
|
|
|
|
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
|
|
|
|
},
|
2021-01-23 01:08:05 -06:00
|
|
|
|
2022-04-21 23:44:02 -05:00
|
|
|
async parseInteraction (client, config, interaction) {
|
|
|
|
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
|
|
|
},
|
|
|
|
|
|
|
|
handle (client, config, user, target) {
|
|
|
|
if (!target) return client.generateErrorMessage('You need to @mention a user!', user.displayAvatarURL());
|
|
|
|
|
|
|
|
const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
|
|
|
|
return {
|
|
|
|
embeds: [{
|
|
|
|
title: ':heart: Cuddle',
|
|
|
|
description: `${target} You have been cuddled by ${user}!`,
|
|
|
|
color: 9442302,
|
|
|
|
footer: {
|
|
|
|
icon_url: user.displayAvatarURL(),
|
|
|
|
text: config.footerTxt
|
|
|
|
},
|
|
|
|
image: {
|
|
|
|
url: gif
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
};
|
2022-03-26 03:33:18 -05:00
|
|
|
}
|
2022-04-21 18:09:21 -05:00
|
|
|
};
|