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/hug.js

39 lines
1.4 KiB
JavaScript
Raw Normal View History

const gifchoices = [
'https://cdn.discordapp.com/attachments/803658122299572255/807670647920001044/hug2.gif',
'https://cdn.discordapp.com/attachments/803658122299572255/807670797983285268/hug1.gif',
'https://cdn.discordapp.com/attachments/803658122299572255/807670951113392178/gif6.gif',
'https://cdn.discordapp.com/attachments/803658122299572255/808834617494208532/gif3new.gif',
'https://cdn.discordapp.com/attachments/803658122299572255/807671126376972308/gif4.gif'
];
2021-01-19 18:00:32 -06:00
module.exports = {
name: require('path').parse(__filename).name,
description: 'Hugs a user!',
async execute (client, message, _, config) {
const taggedUser = message.mentions.users.first();
const avatarURL = message.author.displayAvatarURL();
if (!taggedUser) {
await message.channel.send(client.generateErrorMessage('You need to @mention a user!', avatarURL));
} else {
const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
await message.channel.send({
embeds: [{
title: '<a:ABlobCatHuggle:801232248035999784> Hug',
description: `${taggedUser} You have been hugged by ${message.author}!`,
color: 8311585,
footer: {
icon_url: avatarURL,
text: config.footerTxt
},
image: {
url: gif
}
}]
});
2021-01-19 18:00:32 -06:00
}
}
};