Check for mentioned user
This commit is contained in:
parent
3accd97980
commit
d835cdaebb
2 changed files with 42 additions and 2 deletions
|
@ -5,6 +5,8 @@ module.exports = {
|
||||||
execute(client, message, args) {
|
execute(client, message, args) {
|
||||||
const messageAuthor = message.author
|
const messageAuthor = message.author
|
||||||
const taggedUser = message.mentions.users.first();
|
const taggedUser = message.mentions.users.first();
|
||||||
|
|
||||||
|
|
||||||
// --------------------------------------
|
// --------------------------------------
|
||||||
const gifchoices = [
|
const gifchoices = [
|
||||||
"https://thumbs.gfycat.com/SlowGlossyBlackcrappie-small.gif",
|
"https://thumbs.gfycat.com/SlowGlossyBlackcrappie-small.gif",
|
||||||
|
@ -17,9 +19,27 @@ module.exports = {
|
||||||
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1);
|
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1);
|
||||||
var gif = (gifchoices[index]);
|
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 = {
|
const embed = {
|
||||||
"title": ":heart: Kiss",
|
"title": ":heart: Kiss",
|
||||||
"description": "<@" + taggedUser + ">" + " You have been kissed by <@" + messageAuthor + ">!",
|
"description": "<@" + taggedUser + ">" + ", You have been kissed by <@" + messageAuthor + ">!",
|
||||||
"color": 8311585,
|
"color": 8311585,
|
||||||
"footer": {
|
"footer": {
|
||||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||||
|
|
|
@ -6,7 +6,7 @@ module.exports = {
|
||||||
name: "leskiss",
|
name: "leskiss",
|
||||||
description: "Lesbian kiss <:lesbian:803831629428686849>",
|
description: "Lesbian kiss <:lesbian:803831629428686849>",
|
||||||
execute(client, message, args) {
|
execute(client, message, args) {
|
||||||
const messageAuthor = message.messageAuthor
|
const messageAuthor = message.author
|
||||||
const taggedUser = message.mentions.users.first();
|
const taggedUser = message.mentions.users.first();
|
||||||
// --------------------------------------
|
// --------------------------------------
|
||||||
const gifchoices = [
|
const gifchoices = [
|
||||||
|
@ -30,6 +30,26 @@ module.exports = {
|
||||||
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1);
|
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1);
|
||||||
var gif = (gifchoices[index]);
|
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 = {
|
const embed = {
|
||||||
"title": ":heart: <:lesbian:803831629428686849> Kiss",
|
"title": ":heart: <:lesbian:803831629428686849> Kiss",
|
||||||
|
|
Reference in a new issue