2021-01-19 18:00:32 -06:00
|
|
|
module.exports = {
|
|
|
|
|
|
|
|
name: "pat",
|
|
|
|
description: "Pats an user!",
|
|
|
|
execute(client, message, args) {
|
2022-03-21 12:55:29 -05:00
|
|
|
const {footerTxt} = require('../config.json');
|
2021-01-19 18:00:32 -06:00
|
|
|
const taggedUser = message.mentions.users.first();
|
2021-01-26 14:03:02 -06:00
|
|
|
|
|
|
|
// --------------------------------------
|
|
|
|
const gifchoices = [
|
|
|
|
"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"
|
|
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 2);
|
|
|
|
var gif = (gifchoices[index]);
|
|
|
|
// ---------------------------------------
|
2021-01-30 23:48:07 -06:00
|
|
|
const errorembed = {
|
2021-02-25 01:03:33 -06:00
|
|
|
"title": "<:AnitroxError:809651936563429416> Error",
|
2021-02-06 12:15:55 -06:00
|
|
|
"color": 9442302,
|
2021-01-30 23:48:07 -06:00
|
|
|
"footer": {
|
2022-03-21 12:55:29 -05:00
|
|
|
"icon_url": message.author.displayAvatarURL(),
|
|
|
|
"text": footerTxt
|
2021-01-30 23:48:07 -06:00
|
|
|
},
|
|
|
|
"fields": [
|
|
|
|
{
|
|
|
|
"name": "Well that happened...",
|
|
|
|
"value": "You need to @mention an user!"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
if(!taggedUser) {
|
|
|
|
return message.channel.send({ embed: errorembed});
|
|
|
|
// Checks if a user was mentioned. If not, returns error message.
|
|
|
|
}
|
2021-01-26 14:03:02 -06:00
|
|
|
|
|
|
|
const embed = {
|
2021-01-19 18:00:32 -06:00
|
|
|
"title": "<:pats:801238281286713355> Pat",
|
2021-01-23 01:08:05 -06:00
|
|
|
"description": "<@" + taggedUser + "> You have been patted by <@" + messageAuthor + ">!",
|
2021-01-19 18:00:32 -06:00
|
|
|
"color": 8311585,
|
|
|
|
"footer": {
|
2022-03-21 12:55:29 -05:00
|
|
|
"icon_url": message.author.displayAvatarURL(),
|
|
|
|
"text": footerTxt
|
2021-01-19 18:00:32 -06:00
|
|
|
},
|
|
|
|
"image": {
|
2021-01-26 14:03:02 -06:00
|
|
|
"url": gif
|
2021-01-19 18:00:32 -06:00
|
|
|
}
|
|
|
|
}
|
2021-01-23 01:08:05 -06:00
|
|
|
|
|
|
|
|
|
|
|
message.channel.send({ embed: embed });
|
2021-01-19 18:00:32 -06:00
|
|
|
}
|
|
|
|
}
|