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

45 lines
1.7 KiB
JavaScript
Raw Normal View History

2021-01-19 14:02:09 -06:00
module.exports = {
name: "bonk",
description: "Bonks an user!",
execute(client, message, args) {
const messageAuthor = message.author
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 = {
"title": "<a:SylvBonk:801185845847130113> Bonk",
2021-01-23 01:08:05 -06:00
"description": "<@" + taggedUser + ">" + " You have been bonked by <@" + messageAuthor + ">!",
"color": 3272562,
"footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021"
},
"image": {
"url": "https://cdn.discordapp.com/attachments/793537380330111028/801194481549312060/HappyBONK.gif"
}
}
2021-01-23 01:08:05 -06:00
message.channel.send({ embed: embed });
}
}