slightly nicer handling of the embed's footer

This commit is contained in:
Nathaniel Mason 2022-03-26 08:58:15 +00:00
parent 25971ab8cb
commit 6c10d32fd5
26 changed files with 68 additions and 175 deletions

View File

@ -25,7 +25,7 @@ module.exports = {
name: '8ball', name: '8ball',
description: 'Ask Anitrox a question, any question! and they will answer it!', description: 'Ask Anitrox a question, any question! and they will answer it!',
syntax: ["[Question]"], syntax: ["[Question]"],
async execute(_, message, args, footerTxt) { async execute(_, message, args, footer) {
const answer = answers[Math.floor(Math.random() * Object.keys(answers).length)]; const answer = answers[Math.floor(Math.random() * Object.keys(answers).length)];
const question = args.slice(0).join(" ") const question = args.slice(0).join(" ")
console.log(args); console.log(args);
@ -35,21 +35,14 @@ module.exports = {
"title": "<:AnitroxError:809651936563429416> **Something went wrong!**", "title": "<:AnitroxError:809651936563429416> **Something went wrong!**",
"description": "You need to ask a question!", "description": "You need to ask a question!",
"color": 13632027, "color": 13632027,
"footer": { "footer": footer
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
}
})); }));
} else { } else {
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": ":8ball: Anitrox 8 Ball", "title": ":8ball: Anitrox 8 Ball",
"description": "Your question: **" + question + "**", "description": "Your question: **" + question + "**",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"fields": [ "fields": [
{ {
"name": "🤔 My Answer", "name": "🤔 My Answer",

View File

@ -1,20 +1,17 @@
const { MessageEmbed } = require('discord.js'); const { MessageEmbed } = require('discord.js');
module.exports = { module.exports = {
name: "avatar", name: "avatar",
description: "Gets a user's avatar.", description: "Gets a user's avatar.",
async execute(_0, message, _1, footerTxt) { async execute(_0, message, _1, footer) {
const user = message.mentions.users.first() || message.author; const user = message.mentions.users.first() || message.author;
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": ":frame_photo: " + user.username + "'s Beautiful Avatar!", "title": ":frame_photo: " + user.username + "'s Beautiful Avatar!",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"image": { "image": {
"url": user.displayAvatarURL() "url": user.displayAvatarURL()
} }

View File

@ -4,7 +4,7 @@ module.exports = {
name: "bonk", name: "bonk",
description: "Bonks a user!", description: "Bonks a user!",
async execute(_0, message, _1, footerTxt) { async execute(_0, message, _1, footer) {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
if(!taggedUser) { if(!taggedUser) {
@ -27,10 +27,7 @@ module.exports = {
"title": "<a:SylvBonk:801185845847130113> Bonk", "title": "<a:SylvBonk:801185845847130113> Bonk",
"description": "<@" + taggedUser + ">" + " You have been bonked by <@" + message.author + ">!", "description": "<@" + taggedUser + ">" + " You have been bonked by <@" + message.author + ">!",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"image": { "image": {
"url": "https://cdn.discordapp.com/attachments/793537380330111028/801194481549312060/HappyBONK.gif" "url": "https://cdn.discordapp.com/attachments/793537380330111028/801194481549312060/HappyBONK.gif"
} }

View File

@ -3,7 +3,7 @@ const { MessageEmbed } = require("discord.js");
module.exports = { module.exports = {
name: "cheese", name: "cheese",
description: "Cheese an user, or run just ``n!cheese`` for a surprise :eyes:", description: "Cheese an user, or run just ``n!cheese`` for a surprise :eyes:",
async execute(_0, message, _1, footerTxt) { async execute(_0, message, _1, footer) {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
if(!taggedUser) { if(!taggedUser) {
await message.channel.send("*slams cheese on desk* Cheese. https://www.youtube.com/watch?v=Or4IE8fkpn4"); await message.channel.send("*slams cheese on desk* Cheese. https://www.youtube.com/watch?v=Or4IE8fkpn4");
@ -12,10 +12,7 @@ module.exports = {
"title": ":cheese: Cheesed", "title": ":cheese: Cheesed",
"description": "<@" + taggedUser + ">" + " You got cheesed by " + "<@" + message.author + ">!", "description": "<@" + taggedUser + ">" + " You got cheesed by " + "<@" + message.author + ">!",
"color": 16312092, "color": 16312092,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"image": { "image": {
"url": "https://cdn.discordapp.com/attachments/803658122299572255/812867714368536636/R06325af354168febcafd96b8328b7590.png" "url": "https://cdn.discordapp.com/attachments/803658122299572255/812867714368536636/R06325af354168febcafd96b8328b7590.png"
} }

View File

@ -11,7 +11,7 @@ module.exports = {
name: "cuddle", name: "cuddle",
description: "Cuddle an user!", description: "Cuddle an user!",
async execute(_0, message, _1, footerTxt) { async execute(_0, message, _1, footer) {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
const index = Math.floor(Math.random() * gifchoices.length); const index = Math.floor(Math.random() * gifchoices.length);
@ -24,10 +24,7 @@ module.exports = {
"title": ":heart: Cuddle", "title": ":heart: Cuddle",
"description": "<@" + taggedUser + ">" + " You have been cuddled by " + "<@" + message.author + ">!", "description": "<@" + taggedUser + ">" + " You have been cuddled by " + "<@" + message.author + ">!",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"image": { "image": {
"url": gif "url": gif
} }

View File

@ -5,7 +5,7 @@ module.exports = {
name: 'eval', name: 'eval',
description: 'Runs js code', description: 'Runs js code',
async execute(_, message, args, footerTxt) { async execute(_, message, args, footer) {
if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) { if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) {
try { try {
const code = args.join(" "); const code = args.join(" ");
@ -15,10 +15,7 @@ module.exports = {
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": "<:NyabotError:697145462347661412> **Well that happened...**", "title": "<:NyabotError:697145462347661412> **Well that happened...**",
"color": 13632027, "color": 13632027,
"footer": { "footer": footer,
"icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": footerTxt
},
"fields": [ "fields": [
{ {
"name": "**What Happened?**", "name": "**What Happened?**",

View File

@ -6,15 +6,12 @@ module.exports = {
description: 'Get help on anything from commands, to what the bot does! just not your homework..', description: 'Get help on anything from commands, to what the bot does! just not your homework..',
syntax: '<Command>', syntax: '<Command>',
async execute(_0, message, _1, footerTxt) { async execute(_0, message, _1, footer) {
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": "HELP! SEYMOUR! THE BOT IS ON FIRE!", "title": "HELP! SEYMOUR! THE BOT IS ON FIRE!",
"description": "Get help on anything from commands, to what the bot does! just not your homework..", "description": "Get help on anything from commands, to what the bot does! just not your homework..",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt + " | No mother it's just the northern lights"
},
"fields": [ "fields": [
{ {
"name": "Command List", "name": "Command List",

View File

@ -12,7 +12,7 @@ module.exports = {
name: "hug", name: "hug",
description: "Hugs a user!", description: "Hugs a user!",
async execute(_0, message, _1, footerTxt) { async execute(_0, message, _1, footer) {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
if(!taggedUser) { if(!taggedUser) {
@ -36,10 +36,7 @@ module.exports = {
"title": "<a:ABlobCatHuggle:801232248035999784> Hug", "title": "<a:ABlobCatHuggle:801232248035999784> Hug",
"description": "<@" + taggedUser + ">" + " You have been hugged by " + "<@" + message.author + ">!", "description": "<@" + taggedUser + ">" + " You have been hugged by " + "<@" + message.author + ">!",
"color": 8311585, "color": 8311585,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"image": { "image": {
"url": gif "url": gif
} }

View File

@ -5,7 +5,7 @@ module.exports = {
name: 'info', name: 'info',
description: 'Shows bot and host information', description: 'Shows bot and host information',
async execute(client, message, _, footerTxt) { async execute(client, message, _, footer) {
function Uptime(uptime) { function Uptime(uptime) {
const totalSeconds = (uptime / 1000); const totalSeconds = (uptime / 1000);
@ -30,10 +30,7 @@ module.exports = {
"title": "<:AnitroxInfo:809651936831733791> Information about Anitrox", "title": "<:AnitroxInfo:809651936831733791> Information about Anitrox",
"description": "Everything you've ever wanted to know about your favorite bot, Anitrox!", "description": "Everything you've ever wanted to know about your favorite bot, Anitrox!",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"thumbnail": { "thumbnail": {
"url": client.user.displayAvatarURL() "url": client.user.displayAvatarURL()
}, },

View File

@ -5,15 +5,12 @@ module.exports = {
name: 'invite', name: 'invite',
description: 'Add Anitrox to your beautiful server!', description: 'Add Anitrox to your beautiful server!',
syntax: [], syntax: [],
async execute(_0, message, _1, footerTxt) { async execute(_0, message, _1, footer) {
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": "Add Anitrox to your Server!", "title": "Add Anitrox to your Server!",
"description": "Weather you want stable, or that squeaky clean fresh PTB build, we gotchu.", "description": "Weather you want stable, or that squeaky clean fresh PTB build, we gotchu.",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"thumbnail": { "thumbnail": {
"url": "https://cdn.discordapp.com/attachments/803658122299572255/814352905394061322/anitroxaddsrvr.png" "url": "https://cdn.discordapp.com/attachments/803658122299572255/814352905394061322/anitroxaddsrvr.png"
}, },
@ -30,7 +27,6 @@ module.exports = {
"name": "Need help?", "name": "Need help?",
"value": "Come join the Anitrox Support Server, for support and much more!\n [Anitrox Support Server](https://discord.gg/grebRGsBZ3)" "value": "Come join the Anitrox Support Server, for support and much more!\n [Anitrox Support Server](https://discord.gg/grebRGsBZ3)"
} }
] ]
})); }));
}, },

View File

@ -12,17 +12,14 @@ module.exports = {
name: "kiss", name: "kiss",
description: "Kisses a user!", description: "Kisses a user!",
async execute(_0, message, _1, footerTxt) { async execute(_0, message, _1, footer) {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
if(!taggedUser) { if(!taggedUser) {
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": "<:AnitroxError:809651936563429416> Error", "title": "<:AnitroxError:809651936563429416> Error",
"color": 13632027, "color": 13632027,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"fields": [ "fields": [
{ {
"name": "Well that happened...", "name": "Well that happened...",
@ -36,10 +33,7 @@ module.exports = {
"title": ":heart: Kiss", "title": ":heart: Kiss",
"description": "<@" + taggedUser + ">" + ", You have been kissed by <@" + message.author + ">!", "description": "<@" + taggedUser + ">" + ", You have been kissed by <@" + message.author + ">!",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer,
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021"
},
"image": { "image": {
"url": gif "url": gif
} }

View File

@ -22,17 +22,14 @@ module.exports = {
name: "leskiss", name: "leskiss",
description: "Lesbian kiss <:lesbian:803831629428686849>", description: "Lesbian kiss <:lesbian:803831629428686849>",
async execute(_0, message, _1, footerTxt) { async execute(_0, message, _1, footer) {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
if(!taggedUser) { if(!taggedUser) {
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": "<:AnitroxError:809651936563429416> Error", "title": "<:AnitroxError:809651936563429416> Error",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"fields": [ "fields": [
{ {
"name": "Well that happened...", "name": "Well that happened...",
@ -46,10 +43,7 @@ module.exports = {
"title": ":heart: <:lesbian:803831629428686849> Kiss", "title": ":heart: <:lesbian:803831629428686849> Kiss",
"description": "<@" + taggedUser + ">" + " You have been kissed by <@" + message.author + ">! <:lesbian:803831629428686849>", "description": "<@" + taggedUser + ">" + " You have been kissed by <@" + message.author + ">! <:lesbian:803831629428686849>",
"color": 8311585, "color": 8311585,
"footer": { "footer": footer,
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021"
},
"image": { "image": {
"url": gif "url": gif
} }

View File

@ -11,17 +11,14 @@ module.exports = {
name: "lick", name: "lick",
description: "Licks an user!", description: "Licks an user!",
async execute(_0, message, _1, footerTxt) { async execute(_0, message, _1, footer) {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
if(!taggedUser) { if(!taggedUser) {
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": "<:AnitroxError:809651936563429416> Error", "title": "<:AnitroxError:809651936563429416> Error",
"color": 9442302, "color": 9442302,
"footer": { "footer": 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": [ "fields": [
{ {
"name": "Well that happened...", "name": "Well that happened...",
@ -35,10 +32,7 @@ module.exports = {
"title": "<a:LeafeonLick:806396195089154058> Lick", "title": "<a:LeafeonLick:806396195089154058> Lick",
"description": "<@" + taggedUser + "> You have been licked by <@" + message.author + ">!", "description": "<@" + taggedUser + "> You have been licked by <@" + message.author + ">!",
"color": 8311585, "color": 8311585,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"image": { "image": {
"url": "https://cdn.discordapp.com/attachments/803658122299572255/805314244123951114/cef569820773b0f5d54ee34cfa18e1f8.gif" "url": "https://cdn.discordapp.com/attachments/803658122299572255/805314244123951114/cef569820773b0f5d54ee34cfa18e1f8.gif"
} }

View File

@ -11,17 +11,14 @@ module.exports = {
name: "nom", name: "nom",
description: "Noms an user!", description: "Noms an user!",
async execute(_0, message, _1, footerTxt) { async execute(_0, message, _1, footer) {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
if(!taggedUser) { if(!taggedUser) {
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": "<:AnitroxError:809651936563429416> Error", "title": "<:AnitroxError:809651936563429416> Error",
"color": 9442302, "color": 9442302,
"footer": { "footer": 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 by IDeletedSystem64"
},
"fields": [ "fields": [
{ {
"name": "Well that happened...", "name": "Well that happened...",
@ -35,10 +32,7 @@ module.exports = {
"title": "<:BlobNomBlob:801241117919805510> Nom", "title": "<:BlobNomBlob:801241117919805510> Nom",
"description": "<@" + taggedUser + "> You have been nommed by <@" + messageAuthor + ">!", "description": "<@" + taggedUser + "> You have been nommed by <@" + messageAuthor + ">!",
"color": 8311585, "color": 8311585,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"image": { "image": {
"url": gif "url": gif
} }

View File

@ -3,15 +3,12 @@ const { MessageEmbed } = require("discord.js");
module.exports = { module.exports = {
name: 'opensource', name: 'opensource',
description: 'Attributions to open source components used by Anitrox', description: 'Attributions to open source components used by Anitrox',
async execute(_0, message, _1, footerTxt){ async execute(_0, message, _1, footer){
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": "Component Attribution", "title": "Component Attribution",
"description": "Some parts of Anitrox are using open source code, and their attributions are avaliable here!", "description": "Some parts of Anitrox are using open source code, and their attributions are avaliable here!",
"color": 52508, "color": 52508,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"thumbnail": { "thumbnail": {
"url": "https://cdn.discordapp.com/attachments/803658122299572255/838854256471703602/793885335498522685.png" "url": "https://cdn.discordapp.com/attachments/803658122299572255/838854256471703602/793885335498522685.png"
}, },

View File

@ -10,17 +10,14 @@ module.exports = {
name: "pat", name: "pat",
description: "Pats a user!", description: "Pats a user!",
async execute(_0, message, _1, footerTxt) { async execute(_0, message, _1, footer) {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
if(!taggedUser) { if(!taggedUser) {
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": "<:AnitroxError:809651936563429416> Error", "title": "<:AnitroxError:809651936563429416> Error",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"fields": [ "fields": [
{ {
"name": "Well that happened...", "name": "Well that happened...",
@ -34,10 +31,7 @@ module.exports = {
"title": "<:pats:801238281286713355> Pat", "title": "<:pats:801238281286713355> Pat",
"description": "<@" + taggedUser + "> You have been patted by <@" + messageAuthor + ">!", "description": "<@" + taggedUser + "> You have been patted by <@" + messageAuthor + ">!",
"color": 8311585, "color": 8311585,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"image": { "image": {
"url": gif "url": gif
} }

View File

@ -4,7 +4,7 @@ const { locations } = require('../config.json');
module.exports = { module.exports = {
name: "ping", name: "ping",
description: "Gets bot ping", description: "Gets bot ping",
async execute(client, message, _, footerTxt) { async execute(client, message, _, footer) {
const index = Math.floor(Math.random() * locations.length); const index = Math.floor(Math.random() * locations.length);
const pingLocation = locations[index] const pingLocation = locations[index]
@ -12,10 +12,7 @@ module.exports = {
"title": ":ping_pong: Ping", "title": ":ping_pong: Ping",
"description": "**Pong!** We pinged **" + pingLocation + "** and got " + client.ws.ping + " ms.", "description": "**Pong!** We pinged **" + pingLocation + "** and got " + client.ws.ping + " ms.",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
}
})); }));
} }
}; };

View File

@ -10,17 +10,14 @@ module.exports = {
name: "poke", name: "poke",
description: "Pokes an user!", description: "Pokes an user!",
async execute(_0, message, _1, footerTxt) { async execute(_0, message, _1, footer) {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
if(!taggedUser) { if(!taggedUser) {
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": "<:AnitroxError:809651936563429416> Error", "title": "<:AnitroxError:809651936563429416> Error",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"fields": [ "fields": [
{ {
"name": "Well that happened...", "name": "Well that happened...",
@ -34,10 +31,7 @@ module.exports = {
"title": "👉 Poke!", "title": "👉 Poke!",
"description": "<@" + taggedUser + "> You have been poked by <@" + message.author + ">!", "description": "<@" + taggedUser + "> You have been poked by <@" + message.author + ">!",
"color": 8311585, "color": 8311585,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"image": { "image": {
"url": gif "url": gif
} }

View File

@ -4,7 +4,7 @@ module.exports = {
name: 'reload', name: 'reload',
description: 'Reloads a command', description: 'Reloads a command',
args: true, args: true,
async execute(client, message, args, footerTxt) { async execute(client, message, args, footer) {
if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) { if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) {
const commandName = args[0].toLowerCase(); const commandName = args[0].toLowerCase();
const command = message.client.commands.get(commandName) const command = message.client.commands.get(commandName)
@ -29,10 +29,7 @@ module.exports = {
message.channel.send(new MessageEmbed({ message.channel.send(new MessageEmbed({
"title": "<:NyabotDenied:697145462565896194> **Access is denied**", "title": "<:NyabotDenied:697145462565896194> **Access is denied**",
"color": 13632027, "color": 13632027,
"footer": { "footer": footer,
"icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": footerTxt
},
"fields": [ "fields": [
{ {
"name": "**What Happened?**", "name": "**What Happened?**",

View File

@ -1,10 +1,9 @@
const { token } = require('../config.json'); const { token } = require('../config.json');
const Discord = require('discord.js');
module.exports = { module.exports = {
name: 'restart', name: 'restart',
description: '(Owner Only) Shuts down the bot.', description: '(Owner Only) Shuts down the bot.',
async execute(client, message, args) { async execute(client, message) {
if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) { if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) {
await message.channel.send("<a:NyabotWorking:697147309531594843> Restarting...") await message.channel.send("<a:NyabotWorking:697147309531594843> Restarting...")
try { try {

View File

@ -3,7 +3,7 @@ const { MessageEmbed } = require("discord.js");
module.exports = { module.exports = {
name: 'setnick', name: 'setnick',
description: 'Sets your nickname', description: 'Sets your nickname',
async execute(_, message, args, footerTxt) { async execute(_, message, args, footer) {
if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")) { if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")) {
const newnick = args.slice(0).join(" ") const newnick = args.slice(0).join(" ")
@ -13,10 +13,7 @@ module.exports = {
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": "<:AnitroxSuccess:809651936819019796> Nickname Changed", "title": "<:AnitroxSuccess:809651936819019796> Nickname Changed",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer,
"icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": footerTxt
},
"fields": [ "fields": [
{ {
"name": "Changed nickname successfully!", "name": "Changed nickname successfully!",
@ -33,10 +30,7 @@ module.exports = {
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": "<:AnitroxDenied:809651936642203668> Well that happened...", "title": "<:AnitroxDenied:809651936642203668> Well that happened...",
"color": 13632027, "color": 13632027,
"footer": { "footer": footer,
"icon_url": "https://cdn.discordapp.com/embed/avatars/0.png",
"text": footerTxt
},
"fields": [ "fields": [
{ {
"name": "Failed to set nickname", "name": "Failed to set nickname",

View File

@ -4,17 +4,14 @@ module.exports = {
name: "slap", name: "slap",
description: "Slaps an user!", description: "Slaps an user!",
async execute(_0, message, _1, footerTxt) { async execute(_0, message, _1, footer) {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
if(!taggedUser) { if(!taggedUser) {
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": "<:AnitroxError:809651936563429416> Error", "title": "<:AnitroxError:809651936563429416> Error",
"color": 13632027, "color": 13632027,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"fields": [ "fields": [
{ {
"name": "Well that happened...", "name": "Well that happened...",
@ -27,10 +24,7 @@ module.exports = {
"title": ":anger: Slap", "title": ":anger: Slap",
"description": "<@" + taggedUser + "> You have been slapped by <@" + messageAuthor + ">!", "description": "<@" + taggedUser + "> You have been slapped by <@" + messageAuthor + ">!",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"image": { "image": {
"url": "https://media1.tenor.com/images/b6d8a83eb652a30b95e87cf96a21e007/tenor.gif?itemid=10426943" "url": "https://media1.tenor.com/images/b6d8a83eb652a30b95e87cf96a21e007/tenor.gif?itemid=10426943"
} }

View File

@ -11,17 +11,14 @@ module.exports = {
name: "snuggle", name: "snuggle",
description: "Snuggle an user!", description: "Snuggle an user!",
async execute(_0, message, _1, footerTxt) { async execute(_0, message, _1, footer) {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
if(!taggedUser) { if(!taggedUser) {
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": "<:AnitroxError:809651936563429416> Error", "title": "<:AnitroxError:809651936563429416> Error",
"color": 13632027, "color": 13632027,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"fields": [ "fields": [
{ {
"name": "Well that happened...", "name": "Well that happened...",
@ -34,10 +31,7 @@ module.exports = {
"title": "<:BlobSnuggleCat:806759753450782731> Snuggle", "title": "<:BlobSnuggleCat:806759753450782731> Snuggle",
"description": "<@" + taggedUser + ">" + " You have been snuggled by " + "<@" + messageAuthor + ">!", "description": "<@" + taggedUser + ">" + " You have been snuggled by " + "<@" + messageAuthor + ">!",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"image": { "image": {
"url": gif "url": gif
} }

View File

@ -3,16 +3,13 @@ const { MessageEmbed } = require("discord.js");
module.exports = { module.exports = {
name: "stop", name: "stop",
description: "Stops the bot", description: "Stops the bot",
async execute(client, message, _, footerTxt) { async execute(client, message, _, footer) {
if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) { if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) {
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": "<a:AnitroxWorking:697147309531594843> **Shutting Down...**", "title": "<a:AnitroxWorking:697147309531594843> **Shutting Down...**",
"description": "See you next time!", "description": "See you next time!",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": footerTxt
}
})); }));
client.destroy(); client.destroy();
} else { } else {
@ -20,10 +17,7 @@ module.exports = {
"title": ":AnitroxDenied: Access Denied", "title": ":AnitroxDenied: Access Denied",
"description": "You need to be the bot owner to execute this command!", "description": "You need to be the bot owner to execute this command!",
"color": 13632027, "color": 13632027,
"footer": { "footer": footer
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": footerTxt
}
})); }));
} }
} }

View File

@ -4,16 +4,13 @@ module.exports = {
name: "uinfo", name: "uinfo",
description: "Gets info about an user, such as ID, Discord Join date and more", description: "Gets info about an user, such as ID, Discord Join date and more",
syntax: "<User>", syntax: "<User>",
async execute(client, message, args, footerTxt) { async execute(client, message, args, footer) {
console.log(args[0]) console.log(args[0])
const user = message.mentions.users.first() || client.users.cache.get(args[0]) || message.author const user = message.mentions.users.first() || client.users.cache.get(args[0]) || message.author
await message.channel.send(new MessageEmbed({ await message.channel.send(new MessageEmbed({
"title": "Everything you've ever wanted to know about " + user.username + "!", "title": "Everything you've ever wanted to know about " + user.username + "!",
"color": 9442302, "color": 9442302,
"footer": { "footer": footer,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"thumbnail": { "thumbnail": {
"url": user.displayAvatarURL() "url": user.displayAvatarURL()
}, },

View File

@ -4,6 +4,11 @@ const fs = require('fs');
const Discord = require('discord.js'); const Discord = require('discord.js');
const { statuses, build, release, prefix, token, footerTxt } = require('./config.json'); const { statuses, build, release, prefix, token, footerTxt } = require('./config.json');
const embedFooter = {
"icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": footerTxt
}
console.log('Starting!') console.log('Starting!')
const client = new Discord.Client(); const client = new Discord.Client();
client.commands = new Discord.Collection(); client.commands = new Discord.Collection();
@ -17,7 +22,6 @@ for (const file of commandFiles) {
client.on("error", (e) => console.log("[ERROR]" + error(e))); client.on("error", (e) => console.log("[ERROR]" + error(e)));
client.on("warn", (e) => ("[WARN]" + warn(e))); client.on("warn", (e) => ("[WARN]" + warn(e)));
// Log errors to console.
client.once('ready', () => { client.once('ready', () => {
console.clear() console.clear()
console.log(' ___ _ __ '); console.log(' ___ _ __ ');
@ -47,17 +51,14 @@ client.on('message', async (message) => {
if (!client.commands.has(command)) return; if (!client.commands.has(command)) return;
try { try {
await client.commands.get(command).execute(client, message, args, footerTxt); await client.commands.get(command).execute(client, message, args, embedFooter);
} catch (error) { } catch (error) {
console.stack; console.stack;
message.channel.send(new Discord.MessageEmbed({ message.channel.send(new Discord.MessageEmbed({
"title": "<:AnitroxError:809651936563429416> **Something went wrong!**", "title": "<:AnitroxError:809651936563429416> **Something went wrong!**",
"description": error.stack, "description": error.stack,
"color": 13632027, "color": 13632027,
"footer": { "footer": footer
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt + " | Something went wrong! :("
}
})); }));
} }
}); });