2022-04-21 20:53:03 -05:00
|
|
|
const { Constants } = require('discord.js');
|
|
|
|
|
2022-03-26 03:33:18 -05:00
|
|
|
const gifchoices = [
|
2022-04-21 18:09:21 -05:00
|
|
|
'https://cdn.discordapp.com/attachments/803658122299572255/803708174293008474/tenor.gif',
|
|
|
|
'https://community.gamepress.gg/uploads/default/original/3X/0/a/0a762099c5ad6de9ca5f13dd22a7e45884a99eb3.gif',
|
|
|
|
'https://media1.giphy.com/media/ARSp9T7wwxNcs/giphy.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: 'Pats a user!',
|
2022-04-21 20:53:03 -05:00
|
|
|
options: [{
|
|
|
|
name: 'user',
|
|
|
|
description: 'The user to pat',
|
|
|
|
required: true,
|
|
|
|
type: Constants.ApplicationCommandOptionTypes.USER
|
|
|
|
}],
|
2022-04-21 18:09:21 -05:00
|
|
|
|
|
|
|
async execute (client, message, _, config) {
|
2022-03-26 03:33:18 -05:00
|
|
|
const taggedUser = message.mentions.users.first();
|
2022-04-21 12:24:12 -05:00
|
|
|
const avatarURL = message.author.displayAvatarURL();
|
2022-04-21 18:09:21 -05:00
|
|
|
|
|
|
|
if (!taggedUser) {
|
|
|
|
await message.channel.send(client.generateErrorMessage('You need to @mention a user!', avatarURL));
|
2022-03-26 03:33:18 -05:00
|
|
|
} else {
|
|
|
|
const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
|
2022-04-21 18:09:21 -05:00
|
|
|
await message.channel.send({
|
|
|
|
embeds: [{
|
|
|
|
title: '<:pats:801238281286713355> Pat',
|
|
|
|
description: `${taggedUser} You have been patted by ${message.author}!`,
|
|
|
|
color: 8311585,
|
|
|
|
footer: {
|
|
|
|
icon_url: avatarURL,
|
|
|
|
text: config.footerTxt
|
|
|
|
},
|
|
|
|
image: {
|
|
|
|
url: gif
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
});
|
2021-01-19 18:00:32 -06:00
|
|
|
}
|
2022-03-26 03:33:18 -05:00
|
|
|
}
|
2022-04-21 18:09:21 -05:00
|
|
|
};
|