Check for mentioned user, if none return error.
This commit is contained in:
parent
f331627bdb
commit
73f62ff32d
7 changed files with 127 additions and 7 deletions
|
@ -5,7 +5,26 @@ 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 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": "<a:SylvBonk:801185845847130113> Bonk",
|
"title": "<a:SylvBonk:801185845847130113> Bonk",
|
||||||
"description": "<@" + taggedUser + ">" + " You have been bonked by <@" + messageAuthor + ">!",
|
"description": "<@" + taggedUser + ">" + " You have been bonked by <@" + messageAuthor + ">!",
|
||||||
|
|
|
@ -13,6 +13,27 @@ module.exports = {
|
||||||
"https://data.whicdn.com/images/294164107/original.gif",
|
"https://data.whicdn.com/images/294164107/original.gif",
|
||||||
"https://media1.tenor.com/images/e5e7779385d003db13396e03b7fd1024/tenor.gif?itemid=16619907"
|
"https://media1.tenor.com/images/e5e7779385d003db13396e03b7fd1024/tenor.gif?itemid=16619907"
|
||||||
];
|
];
|
||||||
|
//---------------------------------
|
||||||
|
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 index = Math.floor(Math.random() * (gifchoices.length - 1) + 2);
|
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 2);
|
||||||
var gif = (gifchoices[index]);
|
var gif = (gifchoices[index]);
|
||||||
const embed = {
|
const embed = {
|
||||||
|
|
|
@ -24,8 +24,8 @@ module.exports = {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const version = ("dev build 429")
|
const version = ("Public Test Release 4.1 (build 444)")
|
||||||
const release = ("anitrox_dev")
|
const release = ("anitrox_ptb")
|
||||||
const os = require("os")
|
const os = require("os")
|
||||||
|
|
||||||
const embed = {
|
const embed = {
|
||||||
|
@ -58,7 +58,7 @@ const version = ("dev build 429")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "<:memory:793536677737136178> Bot Memory Usage",
|
"name": "<:memory:793536677737136178> Bot Memory Usage",
|
||||||
"value": (Math.round(process.memoryUsage().heapUsed / 1024 / 1024 * 100) / 100) + " MiB" + ", Total Free Memory"
|
"value": (Math.round(process.memoryUsage().heapUsed / 1024 / 1024 * 100) / 100) + " MiB"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "<:hostinfo:793529505263517747> Host Information",
|
"name": "<:hostinfo:793529505263517747> Host Information",
|
||||||
|
|
|
@ -18,7 +18,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": "<:BlobNomBlob:801241117919805510> Nom",
|
"title": "<:BlobNomBlob:801241117919805510> Nom",
|
||||||
"description": "<@" + taggedUser + "> You have been nommed by <@" + messageAuthor + ">!",
|
"description": "<@" + taggedUser + "> You have been nommed by <@" + messageAuthor + ">!",
|
||||||
|
|
|
@ -17,6 +17,25 @@ module.exports = {
|
||||||
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 2);
|
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 2);
|
||||||
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": "<:pats:801238281286713355> Pat",
|
"title": "<:pats:801238281286713355> Pat",
|
||||||
|
|
|
@ -17,7 +17,26 @@ module.exports = {
|
||||||
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 2);
|
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 2);
|
||||||
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": "👉 Poke!",
|
"title": "👉 Poke!",
|
||||||
"description": "<@" + taggedUser + "> You have been poked by <@" + messageAuthor + ">!",
|
"description": "<@" + taggedUser + "> You have been poked by <@" + messageAuthor + ">!",
|
||||||
|
|
|
@ -5,7 +5,30 @@ 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 embed = {
|
//---------------------------------------------------
|
||||||
|
|
||||||
|
//---------------------------------------------------
|
||||||
|
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": ":anger: Slap",
|
"title": ":anger: Slap",
|
||||||
"description": "<@" + taggedUser + "> You have been slapped by <@" + messageAuthor + ">!",
|
"description": "<@" + taggedUser + "> You have been slapped by <@" + messageAuthor + ">!",
|
||||||
"color": 8311585,
|
"color": 8311585,
|
||||||
|
|
Reference in a new issue