Check for mentioned user

This commit is contained in:
Anthony M 2021-01-30 23:25:00 -06:00 committed by GitHub
parent 3accd97980
commit d835cdaebb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 2 deletions

View file

@ -5,6 +5,8 @@ module.exports = {
execute(client, message, args) {
const messageAuthor = message.author
const taggedUser = message.mentions.users.first();
// --------------------------------------
const gifchoices = [
"https://thumbs.gfycat.com/SlowGlossyBlackcrappie-small.gif",
@ -17,9 +19,27 @@ module.exports = {
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1);
var gif = (gifchoices[index]);
// ---------------------------------------
const errorembed = {
"title": "<:NyabotError:697145462347661412> Error",
"color": 13632027,
"footer": {
"icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64"
},
"fields": [
{
"name": "Well that happened...",
"value": "You need to @mention an user!"
}
]
};
if(!taggedUser) {
return message.channel.send({ embed: errorembed});
}
const embed = {
"title": ":heart: Kiss",
"description": "<@" + taggedUser + ">" + " You have been kissed by <@" + messageAuthor + ">!",
"description": "<@" + taggedUser + ">" + ", You have been kissed by <@" + messageAuthor + ">!",
"color": 8311585,
"footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",

View file

@ -6,7 +6,7 @@ module.exports = {
name: "leskiss",
description: "Lesbian kiss <:lesbian:803831629428686849>",
execute(client, message, args) {
const messageAuthor = message.messageAuthor
const messageAuthor = message.author
const taggedUser = message.mentions.users.first();
// --------------------------------------
const gifchoices = [
@ -30,6 +30,26 @@ module.exports = {
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1);
var gif = (gifchoices[index]);
// ---------------------------------------
const errorembed = {
"title": "<:NyabotError:697145462347661412> Error",
"color": 13632027,
"footer": {
"icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64"
},
"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.
}
const embed = {
"title": ":heart: <:lesbian:803831629428686849> Kiss",