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

61 lines
2.2 KiB
JavaScript
Raw Normal View History

2021-01-19 18:08:38 -06:00
module.exports = {
name: "kiss",
description: "Kisses an user!",
execute(client, message, args) {
const {footerTxt} = require('../config.json');
2021-01-19 18:08:38 -06:00
const taggedUser = message.mentions.users.first();
2021-01-30 23:25:00 -06:00
2021-01-26 14:03:02 -06:00
// --------------------------------------
const gifchoices = [
2021-02-06 12:15:55 -06:00
"https://cdn.discordapp.com/attachments/803658122299572255/807671954055626812/kiss5.gif",
"https://cdn.discordapp.com/attachments/803658122299572255/807671956236140554/kiss2.gif",
"https://cdn.discordapp.com/attachments/803658122299572255/807671964599713862/kiss1.gif",
"https://cdn.discordapp.com/attachments/803658122299572255/807671971168387082/kiss4.gif",
"https://cdn.discordapp.com/attachments/803658122299572255/807672017217781840/kiss3.gif"
2021-01-26 14:03:02 -06:00
];
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1);
var gif = (gifchoices[index]);
// ---------------------------------------
2021-01-30 23:25:00 -06:00
const errorembed = {
"title": "<:AnitroxError:809651936563429416> Error",
2021-01-30 23:25:00 -06:00
"color": 13632027,
"footer": {
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
2021-01-30 23:25:00 -06:00
},
"fields": [
{
"name": "Well that happened...",
"value": "You need to @mention an user!"
}
]
};
if(!taggedUser) {
return message.channel.send({ embed: errorembed});
}
2021-02-06 12:15:55 -06:00
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:08:38 -06:00
"title": ":heart: Kiss",
2021-01-30 23:25:00 -06:00
"description": "<@" + taggedUser + ">" + ", You have been kissed by <@" + messageAuthor + ">!",
2021-02-06 12:15:55 -06:00
"color": 9442302,
2021-01-19 18:08:38 -06:00
"footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021"
},
"image": {
2021-01-26 14:03:02 -06:00
"url": gif
2021-01-19 18:08:38 -06:00
}
}
2021-01-23 01:08:05 -06:00
message.channel.send({ embed: embed });
2021-01-19 18:08:38 -06:00
}
}