From fb3f26cdd43673177ed25e8d87f046c16bedd03b Mon Sep 17 00:00:00 2001 From: Nathaniel Mason Date: Thu, 21 Apr 2022 17:36:03 +0100 Subject: [PATCH] Merge upstream changed into Foxi's dev build --- commands/8ball.js | 2 +- commands/bonk.js | 2 +- commands/choose.js | 2 +- commands/contributors.js | 34 ++++++++++++++++++++++++++++++++++ commands/cuddle.js | 2 +- commands/hug.js | 2 +- commands/kiss.js | 2 +- commands/leskiss.js | 2 +- commands/lick.js | 2 +- commands/nom.js | 2 +- commands/opensource.js | 34 ---------------------------------- commands/pat.js | 2 +- commands/poke.js | 2 +- commands/setnick.js | 2 +- commands/slap.js | 2 +- commands/snuggle.js | 2 +- start.js | 2 +- 17 files changed, 49 insertions(+), 49 deletions(-) create mode 100644 commands/contributors.js delete mode 100644 commands/opensource.js diff --git a/commands/8ball.js b/commands/8ball.js index 927f6d9..4963e24 100644 --- a/commands/8ball.js +++ b/commands/8ball.js @@ -10,7 +10,7 @@ module.exports = { const question = args.slice(0).join(" ") if (!question) { - await message.channel.send(client.generateErrorMessage("You need to ask a question!", message.author.displayAvatarURL)); + await message.channel.send(client.generateErrorMessage("You need to ask a question!")); } else { await message.channel.send({embeds: [{ "title": ":8ball: 8Ball", diff --git a/commands/bonk.js b/commands/bonk.js index 7c4d6ca..510e8b1 100644 --- a/commands/bonk.js +++ b/commands/bonk.js @@ -7,7 +7,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL())); + await message.channel.send(client.generateErrorMessage("You need to @mention a user!")); } else { await message.channel.send({embeds: [{ "title": " Bonk", diff --git a/commands/choose.js b/commands/choose.js index 38d4f37..f2899b0 100644 --- a/commands/choose.js +++ b/commands/choose.js @@ -9,7 +9,7 @@ module.exports = { if (head) options.push(head); if (!options.length) { - await message.channel.send(client.generateErrorMessage("You need to provide some input!", message.author.displayAvatarURL())); + await message.channel.send(client.generateErrorMessage("You need to provide some input!")); } else { const answer = options[Math.floor(Math.random() * options.length)]; await message.channel.send({embeds: [{ diff --git a/commands/contributors.js b/commands/contributors.js new file mode 100644 index 0000000..6cad10d --- /dev/null +++ b/commands/contributors.js @@ -0,0 +1,34 @@ +module.exports = { + + name: require('path').parse(__filename).name, + description: 'Attributions to open source components used by Anitrox', + + async execute(_0, message, _1, config){ + await message.channel.send({embeds: [{ + "title": "Contributors", + "description": "Links to check out our contributors!", + "color": 52508, + "footer": { + "icon_url": message.author.displayAvatarURL(), + "text": config.footerTxt + }, + "thumbnail": { + "url": "https://cdn.discordapp.com/emojis/809651812323164192.webp?size=128&quality=lossless" + }, + "fields": [ + { + "name": "chuu_shi", + "value": "Thanks to Chuu for letting me use some of his resources to host Anitrox!\n <:GitHub:778165439477841981> [Check out his code!](https://github.com/chuushi)" + }, + { + "name": "OfficialTCGMatt", + "value": "Matt has helped quite a bit with Anitrox, especially in the early days of Anitrox's development! He even has his own bot!\n <:GitHub:778165439477841981> [Check out his code!](https://github.com/OfficialTCGMatt)\n :robot: [Check out TheCodingBot!](https://github.com/TMC-Software/TheCodingBot)" + }, + { + "name": "Foxinatel", + "value": "Foxi has made massive improvements to Anitrox, such as improving error handling, and much more!\n<:GitHub:778165439477841981> [Check out his code!](https://github.com/foxinatel)" + } + ] + }]}); + } +} \ No newline at end of file diff --git a/commands/cuddle.js b/commands/cuddle.js index a6c82d3..c5b2a84 100644 --- a/commands/cuddle.js +++ b/commands/cuddle.js @@ -16,7 +16,7 @@ module.exports = { const gif = (gifchoices[index]); if(!taggedUser) { - await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL())); + await message.channel.send(client.generateErrorMessage("You need to @mention a user!")); } else { await message.channel.send({embeds: [{ "title": ":heart: Cuddle", diff --git a/commands/hug.js b/commands/hug.js index ed29754..12ea199 100644 --- a/commands/hug.js +++ b/commands/hug.js @@ -15,7 +15,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL())); + await message.channel.send(client.generateErrorMessage("You need to @mention a user!")); } else { const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)]; await message.channel.send({embeds: [{ diff --git a/commands/kiss.js b/commands/kiss.js index a7ac11a..eb42134 100644 --- a/commands/kiss.js +++ b/commands/kiss.js @@ -15,7 +15,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL())); + await message.channel.send(client.generateErrorMessage("You need to @mention a user!")); } else { const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)]; await message.channel.send({embeds: [{ diff --git a/commands/leskiss.js b/commands/leskiss.js index 77472b9..e635a2c 100644 --- a/commands/leskiss.js +++ b/commands/leskiss.js @@ -25,7 +25,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL())); + await message.channel.send(client.generateErrorMessage("You need to @mention a user!")); } else { const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)]; await message.channel.send({embeds: [{ diff --git a/commands/lick.js b/commands/lick.js index 903ea0d..6748348 100644 --- a/commands/lick.js +++ b/commands/lick.js @@ -14,7 +14,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL())); + await message.channel.send(client.generateErrorMessage("You need to @mention a user!")); } else { const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)]; await message.channel.send({embeds: [{ diff --git a/commands/nom.js b/commands/nom.js index 955a85f..9397295 100644 --- a/commands/nom.js +++ b/commands/nom.js @@ -14,7 +14,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL())); + await message.channel.send(client.generateErrorMessage("You need to @mention a user!")); } else { const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)]; await message.channel.send({embeds: [{ diff --git a/commands/opensource.js b/commands/opensource.js deleted file mode 100644 index 05d5b4c..0000000 --- a/commands/opensource.js +++ /dev/null @@ -1,34 +0,0 @@ -module.exports = { - - name: require('path').parse(__filename).name, - description: 'Attributions to open source components used by Anitrox', - - async execute(_0, message, _1, config){ - await message.channel.send({embeds: [{ - "title": "Component Attribution", - "description": "Some parts of Anitrox are using open source code, and their attributions are avaliable here!", - "color": 52508, - "footer": { - "icon_url": message.author.displayAvatarURL(), - "text": config.footerTxt - }, - "thumbnail": { - "url": "https://cdn.discordapp.com/attachments/803658122299572255/838854256471703602/793885335498522685.png" - }, - "fields": [ - { - "name": "Discord.JS", - "value": "[Check out the Discord.JS project on GitHub](https://github.com/discordjs/discord.js/)" - }, - { - "name": "The Anitrox Project", - "value": "[Check out Anitrox on GitHub](https://github.com/IDeletedSystem64/anitrox)" - }, - { - "name": "You", - "value": "Using and supporting the Anitrox Project, thank you! ❤" - } - ] - }]}); - } -} \ No newline at end of file diff --git a/commands/pat.js b/commands/pat.js index 454c987..243afa1 100644 --- a/commands/pat.js +++ b/commands/pat.js @@ -13,7 +13,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL())); + await message.channel.send(client.generateErrorMessage("You need to @mention a user!")); } else { const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)]; await message.channel.send({embeds: [{ diff --git a/commands/poke.js b/commands/poke.js index ea98dd9..9fbcc91 100644 --- a/commands/poke.js +++ b/commands/poke.js @@ -13,7 +13,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL())); + await message.channel.send(client.generateErrorMessage("You need to @mention a user!")); } else { const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)]; await message.channel.send({embeds: [{ diff --git a/commands/setnick.js b/commands/setnick.js index 30de3e1..69e8ffa 100644 --- a/commands/setnick.js +++ b/commands/setnick.js @@ -18,7 +18,7 @@ module.exports = { "fields": [ { "name": "Changed nickname successfully!", - "value": "You need to have permission ``CHANGE_NICKNAME`` to change your nick!" + "value": `New Nickname: ${newnick}` }, { "name": "New Nickname", diff --git a/commands/slap.js b/commands/slap.js index 77a2062..e39f9b1 100644 --- a/commands/slap.js +++ b/commands/slap.js @@ -7,7 +7,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL())); + await message.channel.send(client.generateErrorMessage("You need to @mention a user!")); } else { await message.channel.send({embeds: [{ "title": ":anger: Slap", diff --git a/commands/snuggle.js b/commands/snuggle.js index 541e991..3d628eb 100644 --- a/commands/snuggle.js +++ b/commands/snuggle.js @@ -14,7 +14,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL())); + await message.channel.send(client.generateErrorMessage("You need to @mention a user!")); } else { const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)]; await message.channel.send({embeds: [{ diff --git a/start.js b/start.js index 6b20004..2f616bf 100755 --- a/start.js +++ b/start.js @@ -18,7 +18,7 @@ client.generateErrorMessage = (errorMsg, messageAuthorURL) => ({embeds: [{ "title": "<:AnitroxError:809651936563429416> Error", "color": 13632027, "footer": { - "icon_url": messageAuthorURL, + "icon_url": message.author.displayAvatarURL(), "text": config.footerTxt }, "fields": [