From 264f57ac536a474a12fbdcdd02ab0d659b3d8d54 Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Thu, 11 Feb 2021 16:07:48 -0600 Subject: [PATCH 01/26] Update config.json --- config.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/config.json b/config.json index 9a2cc5f..85e3bc9 100644 --- a/config.json +++ b/config.json @@ -1,6 +1,4 @@ { "prefix": "n!", - - "token": "", "ownerID": "309427567004483586" } From 726b4d7c7384e7f8781524b816faaaf49a8c2ade Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Thu, 11 Feb 2021 21:39:01 -0600 Subject: [PATCH 02/26] start now clears console on successful startup --- start.js | 193 +++++++++++++++++++++++++++---------------------------- 1 file changed, 96 insertions(+), 97 deletions(-) diff --git a/start.js b/start.js index a51d4c6..cb191f5 100644 --- a/start.js +++ b/start.js @@ -1,97 +1,96 @@ -console.log('Preparing to start!') -const fs = require('fs'); -const Discord = require('discord.js'); -const { prefix, token } = require('./config.json'); -const os = require("os"); - -const version = "build 465"; - -const release = "anitrox_ptb" -const activities_list = [ - "with np!help", - "Where am I?", - "with Sylveons!", - "on my host's hard disk", - "with Sophie", - "HAAAAAAAAPPPPPPPYYYYYYYYYYYYYYYYYYYY", - "Running on " + process.platform + " / " + os.version() + "!", - "with the tea machine", - "with Borked Computers", - "on Sophie's main PC- wait shoot she's coming", - "btw I use Debian linux", - "Watching you", - "Running " + release + " Version " + version, - "in Incognito Mode- wait what", - "uwu", - "Team Fortress 2 with Sophie", - "videos on Hulu", - "American Truck Simulator", - "with my users!", - "with Sophies skirt" -]; - -console.log('Starting! This should only take a moment.') -const client = new Discord.Client(); -client.commands = new Discord.Collection(); -const footicon = "https://cdn.discordapp.com/attachments/803658122299572255/805506708352008232/system64.png" -const footer = "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" - -const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); - -for (const file of commandFiles) { - const command = require(`./commands/${file}`); - client.commands.set(command.name, command); -} - -client.on("error", (e) => console.error(e)); -client.on("warn", (e) => console.warn(e)); - -client.once('ready', () => { - console.log(' ___ _ __ '); - console.log(' / | ____ (_) /__________ _ __'); - console.log(' / /| | / __ \/ / __/ ___/ __ \| |/_/'); - console.log(' / ___ |/ / / / / /_/ / / /_/ /> < '); - console.log('/_/ |_/_/ /_/_/\__/_/ \____/_/|_| ') - - console.log('All Systems Go. | Anitrox (C) 2021 IDeletedSystem64.'); -}); -setInterval(() => { - const index = Math.floor(Math.random() * (activities_list.length - 1) + 1); - client.user.setActivity(activities_list[index]); -}, 20000); - -client.on('message', message => { - if (!message.content.startsWith(prefix) || message.author.bot) return; - - const args = message.content.slice(prefix.length).split(/ +/); - const command = args.shift().toLowerCase(); - - if (!client.commands.has(command)) return; - - try { - client.commands.get(command).execute(client, message, args); - } catch (error) { - console.error - const embed = { - "title": "<:NyabotError:697145462347661412> **Well that happened...**", - "color": 13632027, - "footer": { - "icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png", - "text": "Anitrox © IDeletedSystem64 2018-2021 All Rights Reserved." - }, - "fields": [ - { - "name": "**What Happened?**", - "value": "The command you tried to run failed to execute due to an error." - }, - { - "name": "Error Info", - "value": error.message - } - ] - }; - message.channel.send({ embed }); - } -}); - -client.login(token); +console.log('Preparing to start!') +const fs = require('fs'); +const Discord = require('discord.js'); +const { prefix, token } = require('./config.json'); +const os = require("os"); +const version = "build 467"; +const release = "anitrox_ptb" +const activities_list = [ + "with np!help", + "Where am I?", + "with Sylveons!", + "on my host's hard disk", + "with Sophie", + "HAAAAAAAAPPPPPPPYYYYYYYYYYYYYYYYYYYY", + "Running on " + process.platform + " / " + os.version() + "!", + "with the tea machine", + "with Borked Computers", + "on Sophie's main PC- wait shoot she's coming", + "btw I use Debian linux", + "Watching you", + "Running " + release + " Version " + version, + "in Incognito Mode- wait what", + "uwu", + "Team Fortress 2 with Sophie", + "videos on Hulu", + "American Truck Simulator", + "with my users!", + "with Sophies skirt" +]; + +console.log('Starting! This should only take a moment.') +const client = new Discord.Client(); +client.commands = new Discord.Collection(); +const footicon = "https://cdn.discordapp.com/attachments/803658122299572255/805506708352008232/system64.png" +const footer = "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" + +const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); + +for (const file of commandFiles) { + const command = require(`./commands/${file}`); + client.commands.set(command.name, command); +} + +client.on("error", (e) => console.error(e)); +client.on("warn", (e) => console.warn(e)); + +client.once('ready', () => { + console.clear() + console.log(' ___ _ __ '); + console.log(' / | ____ (_) /__________ _ __'); + console.log(' / /| | / __ \/ / __/ ___/ __ \| |/_/'); + console.log(' / ___ |/ / / / / /_/ / / /_/ /> < '); + console.log('/_/ |_/_/ /_/_/\__/_/ \____/_/|_| ') + + console.log('All Systems Go. | Anitrox (C) 2021 IDeletedSystem64.'); +}); +setInterval(() => { + const index = Math.floor(Math.random() * (activities_list.length - 1) + 1); + client.user.setActivity(activities_list[index]); +}, 20000); + +client.on('message', message => { + if (!message.content.startsWith(prefix) || message.author.bot) return; + + const args = message.content.slice(prefix.length).split(/ +/); + const command = args.shift().toLowerCase(); + + if (!client.commands.has(command)) return; + + try { + client.commands.get(command).execute(client, message, args); + } catch (error) { + console.error + const embed = { + "title": "<:NyabotError:697145462347661412> **Well that happened...**", + "color": 13632027, + "footer": { + "icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png", + "text": "Anitrox © IDeletedSystem64 2018-2021 All Rights Reserved." + }, + "fields": [ + { + "name": "**What Happened?**", + "value": "The command you tried to run failed to execute due to an error." + }, + { + "name": "Error Info", + "value": error.message + } + ] + }; + message.channel.send({ embed }); + } +}); + +client.login(token); From f9223985123cb4de19ef00ffb91e380c9f3dd5d1 Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Fri, 12 Feb 2021 12:17:29 -0600 Subject: [PATCH 03/26] Delete statuses.json --- statuses.json | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 statuses.json diff --git a/statuses.json b/statuses.json deleted file mode 100644 index 217a100..0000000 --- a/statuses.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "activities_list": { - with np!help - Where am I? - with Sylveons! - on my host's hard disk - with Sophie - HAAAAAAAAPPPPPPPYYYYYYYYYYYYYYYYYYYY - with the tea machine - with Borked Computers - on Sophie's main PC- wait shoot she's coming - btw I use Debian linux - Watching you - in Incognito Mode- wait what - uwu - Team Fortress 2 with Sophie - videos on Hulu - American Truck Simulator - my users! - with Sophies skir - } -} \ No newline at end of file From 18bd7f0d8b152fef6a0e08e85d74e74273e46079 Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Fri, 12 Feb 2021 12:18:27 -0600 Subject: [PATCH 04/26] Add new icons to JSON --- icons.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 icons.json diff --git a/icons.json b/icons.json new file mode 100644 index 0000000..39907aa --- /dev/null +++ b/icons.json @@ -0,0 +1,7 @@ +{ + "denied": "<:AnitroxDenied:809651936642203668>", + "error": "<:AnitroxError:809651936563429416> ", + "info": "<:AnitroxInfo:809651936831733791>", + "success": "<:AnitroxSuccess:809651936819019796>", + "warning": "<:AnitroxWarning:809651934717804555>" +} \ No newline at end of file From d92dbd91ace6032b4f619ea3d5a0551208664cbf Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Tue, 23 Feb 2021 00:18:07 -0600 Subject: [PATCH 05/26] Add cheese command, fix info --- commands/cheese.js | 33 +++++++++++++++++++++++++++++++++ commands/info.js | 6 +++--- 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 commands/cheese.js diff --git a/commands/cheese.js b/commands/cheese.js new file mode 100644 index 0000000..86891b5 --- /dev/null +++ b/commands/cheese.js @@ -0,0 +1,33 @@ +module.exports = { +//a + name: "cheese", + description: "Cheese an user, or run just ``n!cheese`` for a surprise :eyes:", + execute(client, message, args) { + const messageAuthor = message.author + const taggedUser = message.mentions.users.first(); + //--------------------------------- + + + if(!taggedUser) { + return message.channel.send("*slams cheese on desk* Cheese. https://www.youtube.com/watch?v=Or4IE8fkpn4"); + + } + + + const embed = { + "title": ":cheese: Cheesed", + "description": "<@" + taggedUser + ">" + " You got cheesed by " + "<@" + messageAuthor + ">!", + "color": 8311585, + "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/803658122299572255/812867714368536636/R06325af354168febcafd96b8328b7590.png" + } + } + + + message.channel.send({ embed: embed }); + } + } diff --git a/commands/info.js b/commands/info.js index f96c97b..7f7c741 100644 --- a/commands/info.js +++ b/commands/info.js @@ -24,14 +24,14 @@ module.exports = { -const version = ("Public Test Release 4.1 (build 444)") +const version = ("Public Test Release 5 (build 465)") const release = ("anitrox_ptb") const os = require("os") const embed = { "title": "<:NyabotInfo:697145463350231040> Information about Anitrox", "description": "Everything you've ever wanted to know about Anitrox!", - "color": 11038194, + "color": 9442302, "footer": { "icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021 " @@ -93,7 +93,7 @@ const version = ("Public Test Release 4.1 (build 444)") }, { "name": "<:usersuccess:793885338250641469> **Special Thanks To**", - "value": "@OfficialTCGMatt for providing help with development/n @chuu_shi Allowing me to host Anitrox on his server" + "value": "@OfficialTCGMatt for providing help with development\n @chuu_shi Allowing me to host Anitrox on his server" } ] From e30882b0550fdd52151cfa5fb8262ccb93e6b56f Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Wed, 24 Feb 2021 22:36:30 -0600 Subject: [PATCH 06/26] Move invite to a embed, update cheese embed color --- commands/cheese.js | 2 +- commands/invite.js | 24 +++++++++++++++++++++++- commands/setnick.js | 6 ++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 commands/setnick.js diff --git a/commands/cheese.js b/commands/cheese.js index 86891b5..2dff733 100644 --- a/commands/cheese.js +++ b/commands/cheese.js @@ -17,7 +17,7 @@ module.exports = { const embed = { "title": ":cheese: Cheesed", "description": "<@" + taggedUser + ">" + " You got cheesed by " + "<@" + messageAuthor + ">!", - "color": 8311585, + "color": 16312092, "footer": { "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021" diff --git a/commands/invite.js b/commands/invite.js index 4a85195..462e819 100644 --- a/commands/invite.js +++ b/commands/invite.js @@ -4,6 +4,28 @@ module.exports = { name: 'invite', description: 'Sends invite to add the bot to a server.', execute(client, message) { - message.channel.send("PTB: https://discord.com/oauth2/authorize?client_id=489125054261755925&scope=bot&permissions=66186303"); + const embed = { + "title": "Add Anitrox to your Server", + "description": "Weather you want stable, or that squeaky clean fresh PTB build, we gotchu.", + "color": 9442302, + "footer": { + "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", + "text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" + }, + "thumbnail": { + "url": "https://cdn.discordapp.com/attachments/803658122299572255/814352905394061322/anitroxaddsrvr.png" + }, + "fields": [ + { + "name": "Anitrox", + "value": "This is the stable main build. \n https://discord.com/oauth2/authorize?client_id=576805923964715018&scope=bot&permissions=8" + }, + { + "name": "Anitrox PTB (Public Test Build)", + "value": "This is the PTB build, which has new features as they are pushed out. and is generally stable. \n https://discord.com/oauth2/authorize?client_id=489125054261755925&scope=bot&permissions=66186303" + } + ] + }; + message.channel.send({ embed }); }, }; \ No newline at end of file diff --git a/commands/setnick.js b/commands/setnick.js new file mode 100644 index 0000000..6965e77 --- /dev/null +++ b/commands/setnick.js @@ -0,0 +1,6 @@ +module.exports = { + name: "setnick", + description: "Set yours or another users nickname." + execute(client, message, args) { + + \ No newline at end of file From 62338fff98f8c6531bf31e1d011e7260b59dd8fa Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Thu, 25 Feb 2021 00:48:40 -0600 Subject: [PATCH 07/26] Add avatar command --- commands/avatar.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 commands/avatar.js diff --git a/commands/avatar.js b/commands/avatar.js new file mode 100644 index 0000000..6703783 --- /dev/null +++ b/commands/avatar.js @@ -0,0 +1,21 @@ +module.exports = { + name: "avatar", + description: "Gets a users avatar.", + execute(client, message, args) { + const user = message.mentions.users.first() + + const embed = { + "title": ":frame_photo: " + user.username + "'s Avatar", + "description": "Here is " + user.username + "'s avatar!", + "color": 9442302, + "footer": { + "icon_url": "https://cdn.discordapp.com/embed/avatars/0.png", + "text": "Made with <3 in Illinois | Anitrox (C) 2018-2021 IDeletedSystem64" + }, + "image": { + "url": user.displayAvatarURL() + } + }; + message.channel.send({ embed }); + } +} From d62381d2b4067f669770e6bf85d9c59a42529604 Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Thu, 25 Feb 2021 01:03:33 -0600 Subject: [PATCH 08/26] Update icons to new Anitrox themed icons. --- commands/8ball.js | 2 +- commands/bonk.js | 2 +- commands/cuddle.js | 3 +++ commands/help.js | 2 +- commands/hug.js | 2 +- commands/info.js | 9 ++++----- commands/invite.js | 9 +++++++++ commands/kiss.js | 2 +- commands/leskiss.js | 2 +- commands/lick.js | 2 +- commands/nom.js | 2 +- commands/pat.js | 2 +- commands/ping.js | 2 +- commands/poke.js | 2 +- commands/reload.js | 4 ++-- commands/restart.js | 2 +- commands/setnick.js | 8 ++++---- commands/slap.js | 2 +- commands/stop.js | 21 ++++++++++++++++++--- commands/userinfo.js | 8 +++++--- 20 files changed, 58 insertions(+), 30 deletions(-) diff --git a/commands/8ball.js b/commands/8ball.js index 2132040..1241877 100644 --- a/commands/8ball.js +++ b/commands/8ball.js @@ -21,7 +21,7 @@ module.exports = { const embed = { "title": ":8ball: Anitrox 8 Ball", "description": "Your question: **" + question + "**", - "color": 6942950, + "color": 9442302, "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" diff --git a/commands/bonk.js b/commands/bonk.js index 41c7d5d..6daa809 100644 --- a/commands/bonk.js +++ b/commands/bonk.js @@ -6,7 +6,7 @@ module.exports = { const messageAuthor = message.author const taggedUser = message.mentions.users.first(); const errorembed = { - "title": "<:NyabotError:697145462347661412> Error", + "title": "<:AnitroxError:809651936563429416> Error", "color": 13632027, "footer": { "icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", diff --git a/commands/cuddle.js b/commands/cuddle.js index 15f1e41..a151285 100644 --- a/commands/cuddle.js +++ b/commands/cuddle.js @@ -17,6 +17,9 @@ module.exports = { var gif = (gifchoices[index]); // --------------------------------------- + if(!taggedUser) { + return message.channel.send("<:AnitroxError:809651936563429416> You need to specify an user!") + } const embed = { "title": ":heart: Cuddle", "description": "<@" + taggedUser + ">" + " You have been cuddled by " + "<@" + messageAuthor + ">!", diff --git a/commands/help.js b/commands/help.js index d897d38..26b15e0 100644 --- a/commands/help.js +++ b/commands/help.js @@ -7,7 +7,7 @@ module.exports = { const messageAuthor = message.author const embed = { "title": "<:NyabotInfo:697145463350231040> **HELP** " + messageAuthor.username + " **THE BOT IS ON FIRE!** ", - "color": 9540095, + "color": 9442302, "description": "More commands are soon to come, stay tuned!", "footer": { "text": "Some commands are hidden for dev-only. | Anitrox © IDeletedSystem64 2018-2021" diff --git a/commands/hug.js b/commands/hug.js index 0204a1f..47f6cf7 100644 --- a/commands/hug.js +++ b/commands/hug.js @@ -14,7 +14,7 @@ module.exports = { ]; //--------------------------------- const errorembed = { - "title": "<:NyabotError:697145462347661412> Error", + "title": "<:AnitroxError:809651936563429416> Error", "color": 9442302, "footer": { "icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", diff --git a/commands/info.js b/commands/info.js index 7f7c741..cd8045d 100644 --- a/commands/info.js +++ b/commands/info.js @@ -23,13 +23,12 @@ module.exports = { }; - -const version = ("Public Test Release 5 (build 465)") +const user = ("309427567004483586") +const version = ("Public Test Release 6 (build 493)") const release = ("anitrox_ptb") const os = require("os") - const embed = { - "title": "<:NyabotInfo:697145463350231040> Information about Anitrox", + "title": "<:AnitroxInfo:809651936831733791> Information about Anitrox", "description": "Everything you've ever wanted to know about Anitrox!", "color": 9442302, "footer": { @@ -37,7 +36,7 @@ const version = ("Public Test Release 5 (build 465)") "text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021 " }, "thumbnail": { - "url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png" + "url": ("https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png") }, "fields": [ { diff --git a/commands/invite.js b/commands/invite.js index 462e819..1e5156b 100644 --- a/commands/invite.js +++ b/commands/invite.js @@ -23,7 +23,16 @@ module.exports = { { "name": "Anitrox PTB (Public Test Build)", "value": "This is the PTB build, which has new features as they are pushed out. and is generally stable. \n https://discord.com/oauth2/authorize?client_id=489125054261755925&scope=bot&permissions=66186303" + }, + { + "name": "Anitrox Dev (Unstable)", + "value": "This isn't availiable for invite, though it is availiable on the support server." + }, + { + "name": "Need help?", + "value": "You can join the support server here: bit.ly/anitrox-help" } + ] }; message.channel.send({ embed }); diff --git a/commands/kiss.js b/commands/kiss.js index 2e80494..2273463 100644 --- a/commands/kiss.js +++ b/commands/kiss.js @@ -19,7 +19,7 @@ module.exports = { var gif = (gifchoices[index]); // --------------------------------------- const errorembed = { - "title": "<:NyabotError:697145462347661412> Error", + "title": "<:AnitroxError:809651936563429416> Error", "color": 13632027, "footer": { "icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", diff --git a/commands/leskiss.js b/commands/leskiss.js index 9412e16..5f83b2a 100644 --- a/commands/leskiss.js +++ b/commands/leskiss.js @@ -31,7 +31,7 @@ module.exports = { var gif = (gifchoices[index]); // --------------------------------------- const errorembed = { - "title": "<:NyabotError:697145462347661412> Error", + "title": "<:AnitroxError:809651936563429416> Error", "color": 9442302, "footer": { "icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", diff --git a/commands/lick.js b/commands/lick.js index 4851bbf..87ab2e8 100644 --- a/commands/lick.js +++ b/commands/lick.js @@ -20,7 +20,7 @@ var gif = (gifchoices[index]); // --------------------------------------- //--------------------------------------------------- const errorembed = { - "title": "<:NyabotError:697145462347661412> Error", + "title": "<:AnitroxError:809651936563429416> Error", "color": 9442302, "footer": { "icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", diff --git a/commands/nom.js b/commands/nom.js index 4956020..98f4961 100644 --- a/commands/nom.js +++ b/commands/nom.js @@ -19,7 +19,7 @@ module.exports = { var gif = (gifchoices[index]); // --------------------------------------- const errorembed = { - "title": "<:NyabotError:697145462347661412> Error", + "title": "<:AnitroxError:809651936563429416> Error", "color": 9442302, "footer": { "icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", diff --git a/commands/pat.js b/commands/pat.js index 033b062..54dc598 100644 --- a/commands/pat.js +++ b/commands/pat.js @@ -18,7 +18,7 @@ module.exports = { var gif = (gifchoices[index]); // --------------------------------------- const errorembed = { - "title": "<:NyabotError:697145462347661412> Error", + "title": "<:AnitroxError:809651936563429416> Error", "color": 9442302, "footer": { "icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", diff --git a/commands/ping.js b/commands/ping.js index e137f35..17b350b 100644 --- a/commands/ping.js +++ b/commands/ping.js @@ -4,7 +4,7 @@ module.exports = { execute(client, message, args) { const embed = { "title": ":ping_pong: Ping", - "color": 15433939, + "color": 9442302, "fields": [ { "name": "Ping is " + client.ws.ping + " ms", diff --git a/commands/poke.js b/commands/poke.js index eb04bfb..1803d64 100644 --- a/commands/poke.js +++ b/commands/poke.js @@ -18,7 +18,7 @@ module.exports = { var gif = (gifchoices[index]); // --------------------------------------- const errorembed = { - "title": "<:NyabotError:697145462347661412> Error", + "title": "<:AnitroxError:809651936563429416> Error", "color": 9442302, "footer": { "icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", diff --git a/commands/reload.js b/commands/reload.js index 387c418..a434e39 100644 --- a/commands/reload.js +++ b/commands/reload.js @@ -2,7 +2,7 @@ module.exports = { name: 'reload', description: 'Reloads a command', args: true, - execute(client, message, args) { + execute(client, message, args, denied) { if (message.author.id == 309427567004483586) { const commandName = args[0].toLowerCase(); const command = message.client.commands.get(commandName) @@ -21,7 +21,7 @@ module.exports = { console.log('User reloaded ${command.name}.') } catch (error) { console.error(error); - message.channel.send(`There was an error while reloading \`${command.name}\`:\n\`${error.message}\``); + message.channel.send(`<:AnitroxError:809651936563429416> There was an error while reloading \`${command.name}\`:\n\`${error.message}\``); } } else { const embed = { diff --git a/commands/restart.js b/commands/restart.js index 9c6e695..009cc4a 100644 --- a/commands/restart.js +++ b/commands/restart.js @@ -3,7 +3,7 @@ module.exports = { name: 'restart', description: '(Owner Only) Shuts down the bot.', execute(client, message, args) { - const { token } = require('./config.json'); + const { token } = require('../config.json'); if (message.author.id == 309427567004483586) { message.channel.send(" Restarting...").then client.destroy() diff --git a/commands/setnick.js b/commands/setnick.js index 6965e77..bbe388e 100644 --- a/commands/setnick.js +++ b/commands/setnick.js @@ -1,6 +1,6 @@ -module.exports = { - name: "setnick", - description: "Set yours or another users nickname." - execute(client, message, args) { +//module.exports = { +// name: "setnick", +// description: "Set yours or another users nickname." +// execute(client, message, args) { \ No newline at end of file diff --git a/commands/slap.js b/commands/slap.js index 0582203..721acb8 100644 --- a/commands/slap.js +++ b/commands/slap.js @@ -9,7 +9,7 @@ module.exports = { //--------------------------------------------------- const errorembed = { - "title": "<:NyabotError:697145462347661412> Error", + "title": "<:AnitroxError:809651936563429416> Error", "color": 13632027, "footer": { "icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", diff --git a/commands/stop.js b/commands/stop.js index 46a1e6b..66a2a74 100644 --- a/commands/stop.js +++ b/commands/stop.js @@ -2,12 +2,27 @@ module.exports = { name: 'stop', description: '(Owner Only) Shuts down the bot.', - execute(client, message, args) { + execute( client, message, args, denied) { if (message.author.id == 309427567004483586) { - message.channel.send(" Shutting Down...").then + message.channel.send(" The bot is stopping!") + .then client.destroy() .catch(console.error) } else { - message.channel.send("<:NyabotDenied:697145462565896194> Access Denied, You must be bot owner to execute this command."); + const embed = { + "title": denied + "**Access is denied**", + "color": 13632027, + "footer": { + "icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png", + "text": "Anitrox © IDeletedSystem64 2018-2021 All Rights Reserved." + }, + "fields": [ + { + "name": "**What Happened?**", + "value": "You don't have the appropriate permissions to run this command!" + } + ] + }; + message.channel.send({ embed }); } }} \ No newline at end of file diff --git a/commands/userinfo.js b/commands/userinfo.js index 4d2e9c2..71723c7 100644 --- a/commands/userinfo.js +++ b/commands/userinfo.js @@ -13,10 +13,12 @@ module.exports = { var i=0;i Date: Thu, 25 Feb 2021 10:11:54 -0600 Subject: [PATCH 09/26] Moved version and build to config file, edited start to support it. --- config.json | 6 +++++- start.js | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/config.json b/config.json index 85e3bc9..45fca20 100644 --- a/config.json +++ b/config.json @@ -1,4 +1,8 @@ { "prefix": "n!", - "ownerID": "309427567004483586" + + "token": "NTQwOTQxNjc5MDQ2Mjk1NTUz.XFR9Mg.MpSy0w6Gqy72nGsfIEH8opOGn8A", + "ownerID": "309427567004483586", + "release": "anitrox_ptb", + "build": "Public Test Release 6, build 493" } diff --git a/start.js b/start.js index cb191f5..b082155 100644 --- a/start.js +++ b/start.js @@ -1,10 +1,10 @@ console.log('Preparing to start!') const fs = require('fs'); const Discord = require('discord.js'); -const { prefix, token } = require('./config.json'); +const { build, release, prefix, token } = require('./config.json'); +const { denied, error, info, success, warning } = require('./icons.json'); const os = require("os"); -const version = "build 467"; -const release = "anitrox_ptb" + const activities_list = [ "with np!help", "Where am I?", @@ -18,7 +18,7 @@ const activities_list = [ "on Sophie's main PC- wait shoot she's coming", "btw I use Debian linux", "Watching you", - "Running " + release + " Version " + version, + "Running " + release + " Version " + build, "in Incognito Mode- wait what", "uwu", "Team Fortress 2 with Sophie", From bb7f7be3058b8b6405a340805826c89dfdd82dfb Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Thu, 25 Feb 2021 10:12:23 -0600 Subject: [PATCH 10/26] Update info to use the new config, add more CPU info. --- commands/info.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/commands/info.js b/commands/info.js index cd8045d..c051e9a 100644 --- a/commands/info.js +++ b/commands/info.js @@ -3,7 +3,8 @@ module.exports = { name: 'info', description: 'Shows bot and host information', - execute(client, message, args) { + execute(client, message, args,) { + const { build, release } = require('../config.json'); function Uptime(uptimetype) { let totalSeconds = (uptimetype / 1000); @@ -22,11 +23,10 @@ module.exports = { return uptime; }; - -const user = ("309427567004483586") -const version = ("Public Test Release 6 (build 493)") - const release = ("anitrox_ptb") + const os = require("os") + var osu = require('node-os-utils') + var cpu = osu.cpu const embed = { "title": "<:AnitroxInfo:809651936831733791> Information about Anitrox", "description": "Everything you've ever wanted to know about Anitrox!", @@ -36,7 +36,7 @@ const version = ("Public Test Release 6 (build 493)") "text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021 " }, "thumbnail": { - "url": ("https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png") + "url": ("https://cdn.discordapp.com/avatars/576805923964715018/20f9b2815850dbbebd6d858308c90330.webp") }, "fields": [ { @@ -49,7 +49,7 @@ const version = ("Public Test Release 6 (build 493)") }, { "name": "Release Version", - "value": version + "value": build }, { "name": "Uptime", @@ -69,7 +69,7 @@ const version = ("Public Test Release 6 (build 493)") }, { "name": "<:cpu:793672442056802354> CPU Type", - "value": process.arch + "value": process.arch + ", " + cpu.model() }, { From 6a8559b33fb9d0eed508d0659025bcfb6a3567f5 Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Thu, 25 Feb 2021 21:58:39 -0600 Subject: [PATCH 11/26] Create entirely new stop command. --- commands/stop.js | 49 +++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/commands/stop.js b/commands/stop.js index 66a2a74..fce8ae6 100644 --- a/commands/stop.js +++ b/commands/stop.js @@ -1,28 +1,31 @@ - module.exports = { - name: 'stop', - description: '(Owner Only) Shuts down the bot.', - execute( client, message, args, denied) { + name: "stop", + description: "Stops the bot", + execute(client, message, args) { if (message.author.id == 309427567004483586) { - message.channel.send(" The bot is stopping!") - .then + const embed = { + "title": ":AnitroxWorking: **Shutting Down...**", + "description": "See you next time!", + "color": 9442302, + "footer": { + "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", + "text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" + } + }; + message.channel.send({ embed }); client.destroy() - .catch(console.error) + process.exit() } else { - const embed = { - "title": denied + "**Access is denied**", - "color": 13632027, - "footer": { - "icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png", - "text": "Anitrox © IDeletedSystem64 2018-2021 All Rights Reserved." - }, - "fields": [ - { - "name": "**What Happened?**", - "value": "You don't have the appropriate permissions to run this command!" - } - ] - }; - message.channel.send({ embed }); + const denied = { + "title": ":AnitroxDenied: Access Denied", + "description": "You need to be the bot owner to execute this command!", + "color": 13632027, + "footer": { + "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", + "text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" + } + }; + message.channel.send({ denied }); + } } - }} \ No newline at end of file + } \ No newline at end of file From ca6161933dd6e43659b25fa5c8656b0a4b9cd197 Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Thu, 25 Feb 2021 22:10:17 -0600 Subject: [PATCH 12/26] final version of stop --- commands/stop.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/commands/stop.js b/commands/stop.js index fce8ae6..7b3fe5f 100644 --- a/commands/stop.js +++ b/commands/stop.js @@ -4,7 +4,7 @@ module.exports = { execute(client, message, args) { if (message.author.id == 309427567004483586) { const embed = { - "title": ":AnitroxWorking: **Shutting Down...**", + "title": " **Shutting Down...**", "description": "See you next time!", "color": 9442302, "footer": { @@ -13,8 +13,9 @@ module.exports = { } }; message.channel.send({ embed }); - client.destroy() - process.exit() + setTimeout(function(){ + client.destroy() + }, 5000); } else { const denied = { "title": ":AnitroxDenied: Access Denied", From 6fd891b6365d2c8e404b50cc266e431a503122b7 Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Sun, 28 Feb 2021 00:39:52 -0600 Subject: [PATCH 13/26] honestly. i dont know what im doing send help --- commands/setnick.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/commands/setnick.js b/commands/setnick.js index bbe388e..dadccff 100644 --- a/commands/setnick.js +++ b/commands/setnick.js @@ -1,6 +1,13 @@ -//module.exports = { -// name: "setnick", -// description: "Set yours or another users nickname." -// execute(client, message, args) { - - \ No newline at end of file +const { DiscordAPIError } = require("discord.js") + +module.exports = { + name: "setnick", + description: "Set yours or another users nickname.", + execute(client, message, args) { + const guild = guild.fetch + const member = guild.member(message.author) + if (guild.member.hasPermission('CHANGE_NICKNAME')) { + message.channel.send("yes") + } else { + message.channel.send("no") + }}} From 2f705a30033f40cdc49e7d003deb6dc3acf996d1 Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Thu, 4 Mar 2021 22:33:44 -0600 Subject: [PATCH 14/26] Begin work on a properly working setnick --- commands/8ball.js | 12 ++++++++++++ commands/setnick.js | 22 +++++++++++----------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/commands/8ball.js b/commands/8ball.js index 1241877..4c324d1 100644 --- a/commands/8ball.js +++ b/commands/8ball.js @@ -18,6 +18,17 @@ module.exports = { var answer = (answers[index]); console.log(args); + if (!question) { + const embed = { + "title": "<:AnitroxError:809651936563429416> Well that happened...", + "description": "You need to specify a question!", + "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" + } + } + } const embed = { "title": ":8ball: Anitrox 8 Ball", "description": "Your question: **" + question + "**", @@ -35,5 +46,6 @@ module.exports = { ] }; message.channel.send({ embed }); + } } \ No newline at end of file diff --git a/commands/setnick.js b/commands/setnick.js index dadccff..2a1dd30 100644 --- a/commands/setnick.js +++ b/commands/setnick.js @@ -1,13 +1,13 @@ -const { DiscordAPIError } = require("discord.js") - module.exports = { - name: "setnick", - description: "Set yours or another users nickname.", - execute(client, message, args) { - const guild = guild.fetch - const member = guild.member(message.author) - if (guild.member.hasPermission('CHANGE_NICKNAME')) { - message.channel.send("yes") + name: 'setnick', + description: 'Sets yours or another users nickname', + execute(client, message, args,) { + new Discord.GuildMember(data, guild); + const guild = guild.fetch + const member = guild.member(message.author) + if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")){ + } else { - message.channel.send("no") - }}} + message.channel.send("no permission") + } +}} \ No newline at end of file From 83b79e1dd531728e9aaeba746576c6e57d35efdb Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Fri, 12 Mar 2021 10:46:52 -0600 Subject: [PATCH 15/26] Anitrox Stable Release Canidiate 1 --- config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json b/config.json index 45fca20..4c9803a 100644 --- a/config.json +++ b/config.json @@ -4,5 +4,5 @@ "token": "NTQwOTQxNjc5MDQ2Mjk1NTUz.XFR9Mg.MpSy0w6Gqy72nGsfIEH8opOGn8A", "ownerID": "309427567004483586", "release": "anitrox_ptb", - "build": "Public Test Release 6, build 493" + "build": "Anitrox Stable Release Canidiate 1" } From 446a38f31adb951a01ef267a8302c1b1a120a6d0 Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Fri, 12 Mar 2021 10:52:40 -0600 Subject: [PATCH 16/26] Bot release + build is now shown on startup --- start.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/start.js b/start.js index b082155..ddf69d1 100644 --- a/start.js +++ b/start.js @@ -25,7 +25,11 @@ const activities_list = [ "videos on Hulu", "American Truck Simulator", "with my users!", - "with Sophies skirt" + "with Sophies skirt", + "Euro Truck Simulator 2", + "with a screwdriver", + "Found new hardware.", + "@everyone" ]; console.log('Starting! This should only take a moment.') @@ -51,7 +55,7 @@ client.once('ready', () => { console.log(' / /| | / __ \/ / __/ ___/ __ \| |/_/'); console.log(' / ___ |/ / / / / /_/ / / /_/ /> < '); console.log('/_/ |_/_/ /_/_/\__/_/ \____/_/|_| ') - + console.log(release + " " + build) console.log('All Systems Go. | Anitrox (C) 2021 IDeletedSystem64.'); }); setInterval(() => { From 2f9cc0563b36112db0cc366564daa1b65ccbde98 Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Fri, 12 Mar 2021 10:57:13 -0600 Subject: [PATCH 17/26] Fix setnick permission issue --- commands/setnick.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/commands/setnick.js b/commands/setnick.js index 2a1dd30..ad9d002 100644 --- a/commands/setnick.js +++ b/commands/setnick.js @@ -1,13 +1,10 @@ module.exports = { name: 'setnick', - description: 'Sets yours or another users nickname', - execute(client, message, args,) { - new Discord.GuildMember(data, guild); - const guild = guild.fetch - const member = guild.member(message.author) - if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")){ - - } else { - message.channel.send("no permission") - } + description: 'i genuinely fucking dont know. :SylvPain:', + execute(client, message, args, Discord) { + if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")) { + message.channel.send("meow") + } else { + message.channel.send("no permission") + }; }} \ No newline at end of file From aa151890e620a1f9aa09684fd1b84b4285236011 Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Fri, 12 Mar 2021 12:28:58 -0600 Subject: [PATCH 18/26] Update setnick,js --- commands/setnick.js | 47 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/commands/setnick.js b/commands/setnick.js index ad9d002..4445797 100644 --- a/commands/setnick.js +++ b/commands/setnick.js @@ -1,10 +1,51 @@ +const { GuildMember } = require("discord.js"); + module.exports = { name: 'setnick', - description: 'i genuinely fucking dont know. :SylvPain:', + description: 'Sets your nickname', execute(client, message, args, Discord) { if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")) { - message.channel.send("meow") + var newnick = args.slice(0).join(" ") + const successembed = { + "title": "<:AnitroxSuccess:809651936819019796> Nickname Changed", + "color": 9442302, + "footer": { + "icon_url": "https://cdn.discordapp.com/embed/avatars/0.png", + "text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" + }, + "fields": [ + { + "name": "Changed nickname successfully!", + "value": "You need to have permission ``CHANGE_NICKNAME`` to change your nick!" + }, + { + "name": "Old Nickname", + "value": "oldnick", + "inline": true + }, + { + "name": "New Nickname", + "value": newnick, + "inline": true + } + ] + }; + GuildMember.setNickname(newnick, "Nickname change requested by a server member. If you don't want users to be able to change their nickname disable 'CHANGE_NICKNAME' via Change Nickname in Roles.") } else { - message.channel.send("no permission") + const failembed = { + "title": "<:AnitroxDenied:809651936642203668> Well that happened...", + "color": 13632027, + "footer": { + "icon_url": "https://cdn.discordapp.com/embed/avatars/0.png", + "text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" + }, + "fields": [ + { + "name": "Failed to set nickname", + "value": "You need to have permission ``CHANGE_NICKNAME`` to change your nick!" + } + ] + }; + message.channel.send({ failembed }); }; }} \ No newline at end of file From b09f4ca31acea9f5250ab4d2a1f52cc20c0b57af Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Tue, 16 Mar 2021 13:24:51 -0500 Subject: [PATCH 19/26] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b3c0dd2..34a8bf6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # Anitrox Dev # aka anitrox_unstable -This is for dev builds of Anitrox, This will be pushed to Anitrox PTB once things are confirmed working/finished. +This is for the dev branch of the bot, The bot can be used in the Support/Development server. From 75fe3064abe2fd4ae33f9c8e1fee430357b648d4 Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Tue, 16 Mar 2021 17:09:00 -0500 Subject: [PATCH 20/26] Fixed an issue in cmd handler that broke everything. --- start.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/start.js b/start.js index ddf69d1..f460495 100644 --- a/start.js +++ b/start.js @@ -72,11 +72,11 @@ client.on('message', message => { if (!client.commands.has(command)) return; try { - client.commands.get(command).execute(client, message, args); + client.commands.get(command).execute(client, message, args, Discord); } catch (error) { console.error const embed = { - "title": "<:NyabotError:697145462347661412> **Well that happened...**", + "title": "<:AnitroxError:809651936563429416> **Well that happened...**", "color": 13632027, "footer": { "icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png", @@ -89,7 +89,7 @@ client.on('message', message => { }, { "name": "Error Info", - "value": error.message + "value": error.stack } ] }; From 64a1655ab9a171b8b19ee96e43966a66aaed2b4f Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Tue, 16 Mar 2021 17:18:18 -0500 Subject: [PATCH 21/26] Update setnick to a (mostly) working version --- commands/setnick.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/commands/setnick.js b/commands/setnick.js index 4445797..5aa41a6 100644 --- a/commands/setnick.js +++ b/commands/setnick.js @@ -4,8 +4,10 @@ module.exports = { name: 'setnick', description: 'Sets your nickname', execute(client, message, args, Discord) { + if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")) { var newnick = args.slice(0).join(" ") + const successembed = { "title": "<:AnitroxSuccess:809651936819019796> Nickname Changed", "color": 9442302, @@ -18,11 +20,6 @@ module.exports = { "name": "Changed nickname successfully!", "value": "You need to have permission ``CHANGE_NICKNAME`` to change your nick!" }, - { - "name": "Old Nickname", - "value": "oldnick", - "inline": true - }, { "name": "New Nickname", "value": newnick, @@ -30,7 +27,7 @@ module.exports = { } ] }; - GuildMember.setNickname(newnick, "Nickname change requested by a server member. If you don't want users to be able to change their nickname disable 'CHANGE_NICKNAME' via Change Nickname in Roles.") + message.member.setNickname(newnick, "Nickname change requested by the server member. If you don't want users to be able to change their nickname disable 'CHANGE_NICKNAME' via Change Nickname in Roles.") } else { const failembed = { "title": "<:AnitroxDenied:809651936642203668> Well that happened...", From 37f45c6d0677c3a1a08f66dff023b9a3d210663d Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Tue, 16 Mar 2021 17:50:29 -0500 Subject: [PATCH 22/26] Update setnick --- commands/setnick.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/setnick.js b/commands/setnick.js index 5aa41a6..dc83b26 100644 --- a/commands/setnick.js +++ b/commands/setnick.js @@ -8,6 +8,7 @@ module.exports = { if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")) { var newnick = args.slice(0).join(" ") + try { const successembed = { "title": "<:AnitroxSuccess:809651936819019796> Nickname Changed", "color": 9442302, @@ -28,7 +29,7 @@ module.exports = { ] }; message.member.setNickname(newnick, "Nickname change requested by the server member. If you don't want users to be able to change their nickname disable 'CHANGE_NICKNAME' via Change Nickname in Roles.") - } else { + } catch (error) { const failembed = { "title": "<:AnitroxDenied:809651936642203668> Well that happened...", "color": 13632027, @@ -45,4 +46,4 @@ module.exports = { }; message.channel.send({ failembed }); }; -}} \ No newline at end of file +}}} \ No newline at end of file From 4935cf3d4326c09b54e17c2a2a56a1d8bf4f3358 Mon Sep 17 00:00:00 2001 From: TheCodingGuy Date: Fri, 19 Mar 2021 00:50:30 -0400 Subject: [PATCH 23/26] Fix setnick.js yeah.. I fixed it? yaay!? --- commands/setnick.js | 84 ++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/commands/setnick.js b/commands/setnick.js index dc83b26..19a9b0f 100644 --- a/commands/setnick.js +++ b/commands/setnick.js @@ -1,49 +1,49 @@ -const { GuildMember } = require("discord.js"); - module.exports = { name: 'setnick', description: 'Sets your nickname', - execute(client, message, args, Discord) { + execute(client, message, args) { if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")) { - var newnick = args.slice(0).join(" ") + var newnick = args.slice(0).join(" ") - try { - const successembed = { - "title": "<:AnitroxSuccess:809651936819019796> Nickname Changed", - "color": 9442302, - "footer": { - "icon_url": "https://cdn.discordapp.com/embed/avatars/0.png", - "text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" - }, - "fields": [ - { - "name": "Changed nickname successfully!", - "value": "You need to have permission ``CHANGE_NICKNAME`` to change your nick!" - }, - { - "name": "New Nickname", - "value": newnick, - "inline": true - } - ] - }; - message.member.setNickname(newnick, "Nickname change requested by the server member. If you don't want users to be able to change their nickname disable 'CHANGE_NICKNAME' via Change Nickname in Roles.") - } catch (error) { - const failembed = { - "title": "<:AnitroxDenied:809651936642203668> Well that happened...", - "color": 13632027, - "footer": { - "icon_url": "https://cdn.discordapp.com/embed/avatars/0.png", - "text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" - }, - "fields": [ - { - "name": "Failed to set nickname", - "value": "You need to have permission ``CHANGE_NICKNAME`` to change your nick!" - } - ] - }; - message.channel.send({ failembed }); + try { + const successembed = { + "title": "<:AnitroxSuccess:809651936819019796> Nickname Changed", + "color": 9442302, + "footer": { + "icon_url": "https://cdn.discordapp.com/embed/avatars/0.png", + "text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" + }, + "fields": [ + { + "name": "Changed nickname successfully!", + "value": "You need to have permission ``CHANGE_NICKNAME`` to change your nick!" + }, + { + "name": "New Nickname", + "value": newnick, + "inline": true + } + ] + }; + message.member.setNickname(newnick, "Nickname change requested by the server member. If you don't want users to be able to change their nickname disable 'CHANGE_NICKNAME' via Change Nickname in Roles.") + message.channel.send({ embed: successembed }); + } catch (error) { + const failembed = { + "title": "<:AnitroxDenied:809651936642203668> Well that happened...", + "color": 13632027, + "footer": { + "icon_url": "https://cdn.discordapp.com/embed/avatars/0.png", + "text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" + }, + "fields": [ + { + "name": "Failed to set nickname", + "value": "You need to have permission ``CHANGE_NICKNAME`` to change your nick!" + } + ] + }; + message.channel.send({ embed: failembed }); + }; }; -}}} \ No newline at end of file +}}} From 01f2d33da5fd3d205481134bde9d60481e999fea Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Fri, 19 Mar 2021 10:08:26 -0500 Subject: [PATCH 24/26] Remove Token --- config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json b/config.json index 4c9803a..258db82 100644 --- a/config.json +++ b/config.json @@ -1,7 +1,7 @@ { "prefix": "n!", - "token": "NTQwOTQxNjc5MDQ2Mjk1NTUz.XFR9Mg.MpSy0w6Gqy72nGsfIEH8opOGn8A", + "token": "token", "ownerID": "309427567004483586", "release": "anitrox_ptb", "build": "Anitrox Stable Release Canidiate 1" From eecfe9fef8ea863dfee7a0c47f082b28be2e0840 Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Fri, 19 Mar 2021 11:00:30 -0500 Subject: [PATCH 25/26] Removed a curly bracket that caused crash on start --- commands/setnick.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/setnick.js b/commands/setnick.js index 19a9b0f..438a4f4 100644 --- a/commands/setnick.js +++ b/commands/setnick.js @@ -46,4 +46,4 @@ module.exports = { message.channel.send({ embed: failembed }); }; }; -}}} +}} From d5a1e5835e4fd8901c5597f14a9d964980caa958 Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Fri, 19 Mar 2021 11:23:33 -0500 Subject: [PATCH 26/26] Update setnick.js --- commands/setnick.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/setnick.js b/commands/setnick.js index 438a4f4..99afa6b 100644 --- a/commands/setnick.js +++ b/commands/setnick.js @@ -11,7 +11,7 @@ module.exports = { "title": "<:AnitroxSuccess:809651936819019796> Nickname Changed", "color": 9442302, "footer": { - "icon_url": "https://cdn.discordapp.com/embed/avatars/0.png", + "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": [