diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dc2fb20 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +node_modules/ +.vscode +package-lock.json +releasenotes.txt +config.json \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..a69a449 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ + +# Anitrox Dev Branch (anitrox_unstable) +This is the development branch for Anitrox, If you want those fresh hot Anitrox builds right from the oven, you've come to the right place! +# Dependencies to get started +To begin, you will need to satisfy the following dependencies: +Node.JS: 14 +npm: 6.14 +# Let's get this ~~party~~ bot started! +For first time start up, You will need to run ``npm install`` to install the needed npm packages. +Afterwards fill out the ``config-example.json`` and rename it to ``config.json``, then just run ``node start.js``! +⚠️ If you don't specify the Owner ID, Some commands such as the bot controls will be unusable! +# Support +Anitrox isn't really supported but you can get help from the Discord server if you need any: discord.gg/5nQtMNpf43 diff --git a/commands.md b/commands.md new file mode 100644 index 0000000..4a99be3 --- /dev/null +++ b/commands.md @@ -0,0 +1,27 @@ +# Anitrox Command List +<> = Optionable +
+[] = Required + +|Command|Arguments |Description | +|-------|----------|------------| +|Help |none |Help? Help!!| +|8ball |[Question]|Ask a question, Any question! | +|avatar |\ |Get a users beautiful avatar | +|bonk |[Member] | Bonk, no horny. | +|cheese |\| Cheese.| +|cuddle |[Member] | Cuddle someone! | +|hug |[Member] | Hug someone! | +|info |none | Information about the bot and host. +|invite |none | Invite Anitrox to your server! +|kiss |[Member] | Kiss someone! | +|leskiss|[Member] | Lesbain kiss (Suggested by Emi) +|lick |[Member] | Did you just lick me!? +|nom |[Member] | Nom someone or something +|opensource| none | Source code for Anitrox +|pat |[Member] | Pat someone! +|ping |none | Ping Elon Musk! or Mars! nah jk, Discord. +|poke |[Member] | Poke someone! +|slap |[Member] | Slap someone :( +|snuggle|[Member] | Snuggle someone! +|uinfo |[Member] | Information about an user \ No newline at end of file diff --git a/commands/8ball.js b/commands/8ball.js new file mode 100644 index 0000000..499359b --- /dev/null +++ b/commands/8ball.js @@ -0,0 +1,62 @@ +module.exports = { + name: '8ball', + description: 'Ask Anitrox a question, any question! and they will answer it!', + syntax: ["[Question]"], + execute(client, message, args) { + const {footerTxt} = require('../config.json'); + const answers = [ + "Heck no!", + "Are you crazy!? No!", + "Don't even think about it.", + "No! You might bork something!", + "Heck yeah", + "I don't think so.", + "Let me think about it first. No.", + "Let me think about it first. Yeah", + "Let me think about it first. Maybe", + "I don't know man", + "Maybe", + "I'm not sure", + "Ask again", + "YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE!!!", + "Definitely!", + "Go for it! :smile:", + "Good idea!", + "Sure" + ] + const index = Object.keys(answers)[Math.floor(Math.random() * Object.keys(answers).length)]; + var question = args.slice(0).join(" ") + var answer = (answers[index]); + console.log(args); + + if (!question) { + const embed = { + "title": "<:AnitroxError:809651936563429416> **Something went wrong!**", + "description": "You need to ask a", + "color": 13632027, + "footer": { + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt + } + } + } + const embed = { + "title": ":8ball: Anitrox 8 Ball", + "description": "Your question: **" + question + "**", + "color": 9442302, + "footer": { + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt + }, + + "fields": [ + { + "name": "🤔 My Answer", + "value": answer + } + ] + }; + message.channel.send({ embed }); + + } +} \ No newline at end of file diff --git a/commands/avatar.js b/commands/avatar.js new file mode 100644 index 0000000..3741e6e --- /dev/null +++ b/commands/avatar.js @@ -0,0 +1,23 @@ +module.exports = { + name: "avatar", + description: "Gets a users avatar.", + execute(client, message, args) { + user = message.mentions.users.first() + if (!user) user = message.author + + const {footerTxt} = require('../config.json'); + + const embed = { + "title": ":frame_photo: " + user.username + "'s Beautiful Avatar!", + "color": 9442302, + "footer": { + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt + }, + "image": { + "url": user.displayAvatarURL() + } + }; + message.channel.send({ embed }); + } +} diff --git a/commands/bonk.js b/commands/bonk.js index 955263f..99da59f 100644 --- a/commands/bonk.js +++ b/commands/bonk.js @@ -3,24 +3,42 @@ module.exports = { name: "bonk", description: "Bonks an user!", execute(client, message, args) { - const messageAuthor = message.author const taggedUser = message.mentions.users.first(); - + const {footerTxt} = require('../config.json'); + const errorembed = { + "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", + "text": "Made with ❤ in Illinois | Anitrox by IDeletedSystem64" + }, + "fields": [ + { + "name": "Well that happened...", + "value": "You need to @mention an user!" + } + ] + }; + + if(!taggedUser) { + return message.channel.send({ embed: errorembed}); + // Checks if a user was mentioned. If not, returns error message. + } + const embed = { "title": " Bonk", - "description": taggedUser + " You have been bonked by " + messageAuthor + "!", - "color": 3272562, + "description": "<@" + taggedUser + ">" + " You have been bonked by <@" + message.author + ">!", + "color": 9442302, "footer": { - "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", - "text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021" + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt }, "image": { "url": "https://cdn.discordapp.com/attachments/793537380330111028/801194481549312060/HappyBONK.gif" } } - - - message.channel.send({ embed: embed }); + + + message.channel.send({ embed: embed }); } } - diff --git a/commands/cheese.js b/commands/cheese.js new file mode 100644 index 0000000..76aae42 --- /dev/null +++ b/commands/cheese.js @@ -0,0 +1,31 @@ +module.exports = { +//a + name: "cheese", + description: "Cheese an user, or run just ``n!cheese`` for a surprise :eyes:", + execute(client, message, args) { + const taggedUser = message.mentions.users.first(); + const {footerTxt} = require('../config.json'); + + 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 " + "<@" + message.author + ">!", + "color": 16312092, + "footer": { + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt + }, + "image": { + "url": "https://cdn.discordapp.com/attachments/803658122299572255/812867714368536636/R06325af354168febcafd96b8328b7590.png" + } + } + + + message.channel.send({ embed: embed }); + } + } diff --git a/commands/cuddle.js b/commands/cuddle.js index 90a156b..b518f31 100644 --- a/commands/cuddle.js +++ b/commands/cuddle.js @@ -3,22 +3,36 @@ module.exports = { name: "cuddle", description: "Cuddle an user!", execute(client, message, args) { - const messageAuthor = message.author const taggedUser = message.mentions.users.first(); - const embed = { + const {footerTxt} = require('../config.json'); + // -------------------------------------- + const gifchoices = [ + "https://i.pinimg.com/originals/4d/89/d7/4d89d7f963b41a416ec8a55230dab31b.gif", + "https://media1.tenor.com/images/6d73b0a9cadef5310be4b6160d2f959a/tenor.gif?itemid=12099823", + "https://media.tenor.com/images/2636cf3c8152631b4630bf71757a4afa/tenor.gif", + "https://i.imgur.com/JiFpT5E.gif" + ]; + const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1); + 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 + "!", - "color": 8311585, + "description": "<@" + taggedUser + ">" + " You have been cuddled by " + "<@" + message.author + ">!", + "color": 9442302, "footer": { - "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", - "text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021" + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt }, "image": { - "url": "https://media.tenor.com/images/7199fdd26fc2c07cd49a34fda3fc37a8/tenor.gif" + "url": gif } } - - - message.channel.send({ embed: embed }); + + + message.channel.send({ embed: embed }); } } diff --git a/commands/eval.js b/commands/eval.js index c4a43c8..8d3eb19 100644 --- a/commands/eval.js +++ b/commands/eval.js @@ -1,6 +1,6 @@ module.exports = { - + name: 'eval', description: 'Runs js code', execute(client, message, args) { @@ -9,14 +9,31 @@ module.exports = { try { const code = args.join(" "); let evaled = eval(code); - + if (typeof evaled !== "string") evaled = require("util").inspect(evaled); - + message.channel.send(clean(evaled), {code:"xl"}); - } catch (err) { - console.log("An error occurred while running that code!") - + } catch (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 }); } }; } diff --git a/commands/help.js b/commands/help.js index 699fc87..bed475e 100644 --- a/commands/help.js +++ b/commands/help.js @@ -1,39 +1,30 @@ module.exports = { - - name: 'help', - description: '', - execute(client, message, args) { + + name: 'help', + description: 'Get help on anything from commands, to what the bot does! just not your homework..', + syntax: '', -const embed = { - "title": "<:NyabotInfo:697145463350231040> **Help? HELP!** ", - "color": 9540095, - "description": "<:NyabotWarning:697145463194910791> Not all commands have been implemented. and may be removed without warning", - "footer": { - "text": "Some commands are hidden for dev-only. | Anitrox © IDeletedSystem64 2018-2021" - }, - "fields": [ - { - "name": "**General Commands**", - "value": "`help` ``info`` ``userinfo`` ``ping`` ``invite`` ``avatar`` ``google`` ``youtube``" + execute(client, message, args) { + const {footerTxt} = require('../config.json'); + + const Embed = { + "title": "HELP! SEYMOUR! THE BOT IS ON FIRE!", + "description": "Get help on anything from commands, to what the bot does! just not your homework..", + "color": 9442302, + "footer": { + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt + " | No mother it's just the northern lights" }, - { - "name": "Moderation Commands", - "value": "`ban` `kick` `warn` `mute` `unban` `unmute` `purge` `permissions`" - }, - { - "name": "Server Management Commands", - "value": "` channelcreate` `channeldelete` `channelrename` `rolecreate` `roleedit` `roledelete` `setnick`" - }, - { - "name": "Fun Commands", - "value": "`hug` `poke` `bonk` `slap` `pat` `kiss` `lick` `cuddle` `nom`" - }, - { - "name": "**Need additional help or want to report an issue?**", - "value": "https://discord.gg/grebRGsBZ3" - } - ] - }; - message.channel.send({ embed }); -} -}; \ No newline at end of file + "fields": [ + { + "name": "Command List", + "value": "[Click here!](https://github.com/IDeletedSystem64/anitrox/blob/dev/commands.md)" + }, + { + "name": "...Or is the bot actually on fire?", + "value": "Join the [support server!](https://discord.gg/grebRGsBZ3)" + } + ] + }; + message.channel.send({ embed: Embed }); +}}; \ No newline at end of file diff --git a/commands/hug.js b/commands/hug.js index 1501c84..4c17632 100644 --- a/commands/hug.js +++ b/commands/hug.js @@ -3,22 +3,52 @@ module.exports = { name: "hug", description: "Hugs an user!", execute(client, message, args) { - const messageAuthor = message.author + const {footerTxt} = require('../config.json'); const taggedUser = message.mentions.users.first(); - const embed = { + const gifchoices = [ + "https://cdn.discordapp.com/attachments/803658122299572255/807670647920001044/hug2.gif", + "https://cdn.discordapp.com/attachments/803658122299572255/807670797983285268/hug1.gif", + "https://cdn.discordapp.com/attachments/803658122299572255/807670951113392178/gif6.gif", + "https://cdn.discordapp.com/attachments/803658122299572255/808834617494208532/gif3new.gif", + "https://cdn.discordapp.com/attachments/803658122299572255/807671126376972308/gif4.gif" + ]; + //--------------------------------- + const errorembed = { + "title": "<:AnitroxError:809651936563429416> Error", + "color": 9442302, + "footer": { + "icon_url": message.author.displayAvatarURL(), + "text": message.author.displayAvatarURL() + }, + "fields": [ + { + "name": "Well that happened...", + "value": "You need to @mention an user!" + } + ] + }; + + if(!taggedUser) { + return message.channel.send({ embed: errorembed}); + // Checks if a user was mentioned. If not, returns error message. + } + + const index = Math.floor(Math.random() * (gifchoices.length - 1) + 0.4); + var gif = (gifchoices[index]); + const embed = { "title": " Hug", - "description": taggedUser + " You have been hugged by " + messageAuthor + "!", + "description": "<@" + taggedUser + ">" + " You have been hugged by " + "<@" + message.author + ">!", "color": 8311585, "footer": { - "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", - "text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021" + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt }, "image": { - "url": "https://i.imgur.com/r9aU2xv.gif?noredirect" + "url": gif } } - - - message.channel.send({ embed: embed }); + + + message.channel.send({ embed: embed }); } } diff --git a/commands/info.js b/commands/info.js index 21519b8..648adcd 100644 --- a/commands/info.js +++ b/commands/info.js @@ -1,9 +1,11 @@ +const { Client, ClientUser } = require('discord.js'); module.exports = { - + name: 'info', description: 'Shows bot and host information', execute(client, message, args) { + const { build, release, footerTxt } = require('../config.json'); function Uptime(uptimetype) { let totalSeconds = (uptimetype / 1000); @@ -21,23 +23,21 @@ module.exports = { let uptime = `${days}**, **${hours}**, **${minutes}**, **${seconds}`; return uptime; }; - - -const version = ("DEV1.0") - const release = ("anitrox_dev") const os = require("os") - + var osu = require('node-os-utils') + var cpu = osu.cpu + let botAvatar = client.user.displayAvatarURL() const embed = { - "title": "<:NyabotInfo:697145463350231040> Information about projectanitrox", - "description": "Everything you've ever wanted to know about projectanitrox!", - "color": 11038194, + "title": "<:AnitroxInfo:809651936831733791> Information about Anitrox", + "description": "Everything you've ever wanted to know about your favorite bot, Anitrox!", + "color": 9442302, "footer": { - "icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png", - "text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021 " + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt }, "thumbnail": { - "url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png" + "url": client.user.displayAvatarURL() }, "fields": [ { @@ -46,19 +46,33 @@ const version = ("DEV1.0") }, { "name": "Release Type", - "value": release + "value": release, + "inline": true }, { "name": "Release Version", - "value": version + "value": build, + "inline": true }, { "name": "Uptime", - "value": Uptime(client.uptime) + "value": Uptime(client.uptime), + "inline": true }, { "name": "<:memory:793536677737136178> Bot Memory Usage", - "value": (Math.round(process.memoryUsage().heapUsed / 1024 / 1024 * 100) / 100) + " MiB" + ", Total Free Memory" + "value": (Math.round(process.memoryUsage().heapUsed / 1024 / 1024 * 100) / 100) + " MiB", + "inline": true + }, + { + "name": "Bot Name", + "value": client.user.tag, + "inline": true + }, + { + "name": "Bot ID", + "value": "``" + client.user.id + "``", + "inline": true }, { "name": "<:hostinfo:793529505263517747> Host Information", @@ -70,9 +84,9 @@ const version = ("DEV1.0") }, { "name": "<:cpu:793672442056802354> CPU Type", - "value": process.arch + "value": process.arch + ", " + cpu.model() }, - + { "name": "<:hostos:793866961675223090> OS Type", "value": process.platform + " / " + os.version() @@ -81,23 +95,14 @@ const version = ("DEV1.0") "name": "<:node:793537507018145813> Node.JS Version", "value": process.version }, - { - "name": "<:Discord:793676263411679232> Discord API Ping", - "value": "tba" + " ms", - "inline": true - }, { "name": "<:hostinfo:793529505263517747> Bot Ping", "value": Math.round(client.ws.ping) + " ms", "inline": true }, - { - "name": "<:NyabotInfo:697145463350231040> **Want more system information?**", - "value": "Run n!sysinfo for more detailed system information" - }, { "name": "<:usersuccess:793885338250641469> **Special Thanks To**", - "value": "@OfficialTCGMatt for providing help with development" + "value": "@OfficialTCGMatt for providing help with development\n @chuu_shi Allowing me to host Anitrox on his server" } ] @@ -105,4 +110,4 @@ const version = ("DEV1.0") message.channel.send({ embed }); } - }; \ No newline at end of file + }; diff --git a/commands/invite.js b/commands/invite.js index 4a85195..d2d184a 100644 --- a/commands/invite.js +++ b/commands/invite.js @@ -2,8 +2,37 @@ module.exports = { name: 'invite', - description: 'Sends invite to add the bot to a server.', + description: 'Add Anitrox to your beautiful server!', + syntax: [], execute(client, message) { - message.channel.send("PTB: https://discord.com/oauth2/authorize?client_id=489125054261755925&scope=bot&permissions=66186303"); + const {footerTxt} = require('../config.json'); + 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": message.author.displayAvatarURL(), + "text": footerTxt + }, + "thumbnail": { + "url": "https://cdn.discordapp.com/attachments/803658122299572255/814352905394061322/anitroxaddsrvr.png" + }, + "fields": [ + { + "name": "Anitrox", + "value": "Get the ripe off the vine Anitrox! \n [Add Anitrox to your server](https://discord.com/oauth2/authorize?client_id=576805923964715018&scope=bot&permissions=8)" + }, + { + "name": "Anitrox PTB (Public Test Build)", + "value": "So you want the fresh and hot builds straight from the oven? We gotchu \n [Add Anitrox PTB to your server](https://discord.com/oauth2/authorize?client_id=489125054261755925&scope=bot&permissions=66186303)" + }, + { + "name": "Need help?", + "value": "Come join the Anitrox Support Server, for support and much more!\n [Anitrox Support Server](https://discord.gg/grebRGsBZ3)" + } + + ] + }; + message.channel.send({ embed }); }, }; \ No newline at end of file diff --git a/commands/kiss.js b/commands/kiss.js index c184a98..e4b8fca 100644 --- a/commands/kiss.js +++ b/commands/kiss.js @@ -3,22 +3,58 @@ module.exports = { name: "kiss", description: "Kisses an user!", execute(client, message, args) { - const messageAuthor = message.author + const {footerTxt} = require('../config.json'); const taggedUser = message.mentions.users.first(); - const embed = { + + + // -------------------------------------- + const gifchoices = [ + "https://cdn.discordapp.com/attachments/803658122299572255/807671954055626812/kiss5.gif", + "https://cdn.discordapp.com/attachments/803658122299572255/807671956236140554/kiss2.gif", + "https://cdn.discordapp.com/attachments/803658122299572255/807671964599713862/kiss1.gif", + "https://cdn.discordapp.com/attachments/803658122299572255/807671971168387082/kiss4.gif", + "https://cdn.discordapp.com/attachments/803658122299572255/807672017217781840/kiss3.gif" + ]; + const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1); + var gif = (gifchoices[index]); + // --------------------------------------- + const errorembed = { + "title": "<:AnitroxError:809651936563429416> Error", + "color": 13632027, + "footer": { + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt + }, + "fields": [ + { + "name": "Well that happened...", + "value": "You need to @mention an user!" + } + ] + }; + + if(!taggedUser) { + return message.channel.send({ embed: errorembed}); + } + + if(!taggedUser) { + return message.channel.send({ embed: errorembed}); + // Checks if a user was mentioned. If not, returns error message. + } + const embed = { "title": ":heart: Kiss", - "description": taggedUser + " You have been kissed by " + messageAuthor + "!", - "color": 8311585, + "description": "<@" + taggedUser + ">" + ", You have been kissed by <@" + messageAuthor + ">!", + "color": 9442302, "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://i.pinimg.com/originals/e3/4e/31/e34e31123f8f35d5c771a2d6a70bef52.gif" + "url": gif } } - - - message.channel.send({ embed: embed }); + + + message.channel.send({ embed: embed }); } } diff --git a/commands/leskiss.js b/commands/leskiss.js new file mode 100644 index 0000000..a94c328 --- /dev/null +++ b/commands/leskiss.js @@ -0,0 +1,70 @@ +const { Message } = require("discord.js"); +const { execute } = require("./info"); + +module.exports = { + + name: "leskiss", + description: "Lesbian kiss <:lesbian:803831629428686849>", + execute(client, message, args) { + const taggedUser = message.mentions.users.first(); + const {footerTxt} = require('../config.json'); + // -------------------------------------- + const gifchoices = [ + "https://cdn.discordapp.com/attachments/793537380330111028/803833954750038066/gif5.gif", + "https://cdn.discordapp.com/attachments/793537380330111028/803833959338475550/gif12.gif", + "https://cdn.discordapp.com/attachments/793537380330111028/803834034135236628/gif9.gif", + "https://cdn.discordapp.com/attachments/793537380330111028/803834082034843658/gif18.gif", + "https://cdn.discordapp.com/attachments/793537380330111028/803834094063583302/gif8.gif", + "https://cdn.discordapp.com/attachments/793537380330111028/803834099869024296/gif10.gif", + "https://cdn.discordapp.com/attachments/793537380330111028/803834132035665950/gif16.gif", + "https://cdn.discordapp.com/attachments/793537380330111028/803834146413084713/gif13.gif", + "https://cdn.discordapp.com/attachments/793537380330111028/803834249425715210/gif22.gif", + "https://cdn.discordapp.com/attachments/793537380330111028/803834323898990592/gif11.gif", + "https://cdn.discordapp.com/attachments/793537380330111028/803834328848793650/gif14.gif", + "https://cdn.discordapp.com/attachments/793537380330111028/803834391226351676/gif17.gif", + "https://cdn.discordapp.com/attachments/793537380330111028/803834391226351676/gif17.gif", + "https://cdn.discordapp.com/attachments/793537380330111028/803834498714304522/gif15.gif", + "https://cdn.discordapp.com/attachments/793537380330111028/803834514269798460/gif19.gif" + + ]; + const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1.75); + var gif = (gifchoices[index]); + // --------------------------------------- + const errorembed = { + "title": "<:AnitroxError:809651936563429416> Error", + "color": 9442302, + "footer": { + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt + }, + "fields": [ + { + "name": "Well that happened...", + "value": "You need to @mention an user!" + } + ] + }; + + if(!taggedUser) { + return message.channel.send({ embed: errorembed}); + // Checks if a user was mentioned. If not, returns error message. + } + + + const embed = { + "title": ":heart: <:lesbian:803831629428686849> Kiss", + "description": "<@" + taggedUser + ">" + " You have been kissed by <@" + messageAuthor + ">! <:lesbian:803831629428686849>", + "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": gif + } + } + + + message.channel.send({ embed: embed }); + } +} diff --git a/commands/lick.js b/commands/lick.js new file mode 100644 index 0000000..7d10aef --- /dev/null +++ b/commands/lick.js @@ -0,0 +1,58 @@ +module.exports = { + + name: "lick", + description: "Licks an user!", + execute(client, message, args) { + const {footerTxt} = require('../config.json'); + const taggedUser = message.mentions.users.first(); +//--------------------------------------------------- + // -------------------------------------- + const gifchoices = [ + "https://cdn.discordapp.com/attachments/803658122299572255/805314244123951114/cef569820773b0f5d54ee34cfa18e1f8.gif", + "https://cdn.lowgif.com/full/2027501b8fa5225c-.gif", + "https://i.gifer.com/36Nx.gif", + "https://media.tenor.com/images/e8bbe712a5f36bbe9545930894b08bf9/tenor.gif" + + +]; +const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1); +var gif = (gifchoices[index]); +// --------------------------------------- +//--------------------------------------------------- +const errorembed = { + "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", + "text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" + }, + "fields": [ + { + "name": "Well that happened...", + "value": "You need to @mention an user!" + } + ] +}; + +if(!taggedUser) { + return message.channel.send({ embed: errorembed}); +// Checks if a user was mentioned. If not, returns error message. +} + + const embed = { + "title": " Lick", + "description": "<@" + taggedUser + "> You have been licked by <@" + message.author + ">!", + "color": 8311585, + "footer": { + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt + }, + "image": { + "url": "https://cdn.discordapp.com/attachments/803658122299572255/805314244123951114/cef569820773b0f5d54ee34cfa18e1f8.gif" + } + } + + + message.channel.send({ embed: embed }); + } + } diff --git a/commands/nom.js b/commands/nom.js index 08a049f..d77eddd 100644 --- a/commands/nom.js +++ b/commands/nom.js @@ -3,22 +3,55 @@ module.exports = { name: "nom", description: "Noms an user!", execute(client, message, args) { - const messageAuthor = message.author + const {footerTxt} = require('../config.json'); const taggedUser = message.mentions.users.first(); - const embed = { + + // -------------------------------------- + const gifchoices = [ + "https://i.imgur.com/Ns1RBzX.gif", + "https://cdn.lowgif.com/full/2027501b8fa5225c-.gif", + "https://i.gifer.com/36Nx.gif", + "https://media.tenor.com/images/e8bbe712a5f36bbe9545930894b08bf9/tenor.gif" + + + ]; + const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1); + var gif = (gifchoices[index]); + // --------------------------------------- + const errorembed = { + "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", + "text": "Made with ❤ in Illinois | Anitrox by IDeletedSystem64" + }, + "fields": [ + { + "name": "Well that happened...", + "value": "You need to @mention an user!" + } + ] + }; + + if(!taggedUser) { + return message.channel.send({ embed: errorembed}); + // Checks if a user was mentioned. If not, returns error message. + } + + const embed = { "title": "<:BlobNomBlob:801241117919805510> Nom", - "description": taggedUser + " You have been nommed by " + messageAuthor + "!", + "description": "<@" + taggedUser + "> You have been nommed 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" + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt }, "image": { - "url": "https://data.whicdn.com/images/279560594/original.gif" + "url": gif } } - - - message.channel.send({ embed: embed }); + + + message.channel.send({ embed: embed }); } } diff --git a/commands/opensource.js b/commands/opensource.js new file mode 100644 index 0000000..342558d --- /dev/null +++ b/commands/opensource.js @@ -0,0 +1,33 @@ +module.exports = { + name: 'opensource', + description: 'Attributions to open source components used by Anitrox', + execute(client, message, args){ + const {footerTxt} = require('../config.json'); + const embed = { + "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": 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! ❤" + } + ] + }; + message.channel.send({ embed }); + }} \ No newline at end of file diff --git a/commands/pat.js b/commands/pat.js index 92be259..adc8ee8 100644 --- a/commands/pat.js +++ b/commands/pat.js @@ -3,22 +3,54 @@ module.exports = { name: "pat", description: "Pats an user!", execute(client, message, args) { - const messageAuthor = message.author + const {footerTxt} = require('../config.json'); const taggedUser = message.mentions.users.first(); - const embed = { + + // -------------------------------------- + const gifchoices = [ + "https://cdn.discordapp.com/attachments/803658122299572255/803708174293008474/tenor.gif", + "https://community.gamepress.gg/uploads/default/original/3X/0/a/0a762099c5ad6de9ca5f13dd22a7e45884a99eb3.gif", + "https://media1.giphy.com/media/ARSp9T7wwxNcs/giphy.gif" + + + ]; + const index = Math.floor(Math.random() * (gifchoices.length - 1) + 2); + var gif = (gifchoices[index]); + // --------------------------------------- + const errorembed = { + "title": "<:AnitroxError:809651936563429416> Error", + "color": 9442302, + "footer": { + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt + }, + "fields": [ + { + "name": "Well that happened...", + "value": "You need to @mention an user!" + } + ] + }; + + if(!taggedUser) { + return message.channel.send({ embed: errorembed}); + // Checks if a user was mentioned. If not, returns error message. + } + + const embed = { "title": "<:pats:801238281286713355> Pat", - "description": taggedUser + " You have been patted by " + messageAuthor + "!", + "description": "<@" + taggedUser + "> You have been patted 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" + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt }, "image": { - "url": "https://media1.giphy.com/media/ARSp9T7wwxNcs/giphy.gif" + "url": gif } } - - - message.channel.send({ embed: embed }); + + + message.channel.send({ embed: embed }); } } diff --git a/commands/ping.js b/commands/ping.js new file mode 100644 index 0000000..bfd0020 --- /dev/null +++ b/commands/ping.js @@ -0,0 +1,21 @@ +module.exports = { + name: "ping", + description: "Gets bot ping", + execute(client, message) { + const {footerTxt, locations} = require('../config.json'); + + const index = Math.floor(Math.random() * (locations.length -1 ) + 1); + PingLocation = locations[index] + const embed = { + "title": ":ping_pong: Ping", + "description": "**Pong!** We pinged **" + PingLocation + "** and got " + client.ws.ping + " ms.", + "color": 9442302, + "footer": { + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt + } +} + + message.channel.send({ embed }); + } +}; diff --git a/commands/poke.js b/commands/poke.js index cf457c7..d9a1fd5 100644 --- a/commands/poke.js +++ b/commands/poke.js @@ -5,20 +5,52 @@ module.exports = { execute(client, message, args) { const messageAuthor = message.author const taggedUser = message.mentions.users.first(); - const embed = { + + // -------------------------------------- + const gifchoices = [ + "https://i.pinimg.com/originals/b4/95/fb/b495fb19f4b9a1b04f48297b676c497b.gif", + "https://i.imgur.com/H7Ok5tn.gif", + "https://media1.tenor.com/images/8fe23ec8e2c5e44964e5c11983ff6f41/tenor.gif?itemid=5600215" + + + ]; + const index = Math.floor(Math.random() * (gifchoices.length - 1) + 2); + var gif = (gifchoices[index]); + // --------------------------------------- + const errorembed = { + "title": "<:AnitroxError:809651936563429416> Error", + "color": 9442302, + "footer": { + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt + }, + "fields": [ + { + "name": "Well that happened...", + "value": "You need to @mention an user!" + } + ] + }; + + if(!taggedUser) { + return message.channel.send({ embed: errorembed}); + // Checks if a user was mentioned. If not, returns error message. + } + + const embed = { "title": "👉 Poke!", - "description": taggedUser + " You have been poked by " + messageAuthor + "!", + "description": "<@" + taggedUser + "> You have been poked 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" + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt }, "image": { - "url": "https://i.gifer.com/4IdP.gif" + "url": gif } } - - - message.channel.send({ embed: embed }); + + + message.channel.send({ embed: embed }); } } diff --git a/commands/reload.js b/commands/reload.js index ad9a103..59af0ac 100644 --- a/commands/reload.js +++ b/commands/reload.js @@ -1,26 +1,44 @@ -module.exports = { - name: 'reload', - description: 'Reloads a command', - args: true, - execute(client, message, args) { - const commandName = args[0].toLowerCase(); - const command = message.client.commands.get(commandName) - || message.client.commands.find(cmd => cmd.aliases && cmd.aliases.includes(commandName)); - - if (!command) { - return message.channel.send(`There is no command with name or alias \`${commandName}\`, ${message.author}!`); - } - - delete require.cache[require.resolve(`./${command.name}.js`)]; - - try { - const newCommand = require(`./${command.name}.js`); - message.client.commands.set(newCommand.name, newCommand); - message.channel.send(`<:NyabotSuccess:697211376740859914> **Reloaded \`${command.name}\` successfully!**`); - console.log('User reloaded ${command.name}.') - } catch (error) { - console.error(error); - message.channel.send(`There was an error while reloading a command \`${command.name}\`:\n\`${error.message}\``); - } - }, +module.exports = { + name: 'reload', + description: 'Reloads a command', + args: true, + execute(client, message, args, denied) { + if (message.author.id == 309427567004483586) { + const commandName = args[0].toLowerCase(); + const command = message.client.commands.get(commandName) + || message.client.commands.find(cmd => cmd.aliases && cmd.aliases.includes(commandName)); + + if (!command) { + return message.channel.send(`There is no command with name or alias \`${commandName}\`, ${message.author}!`); + } + + delete require.cache[require.resolve(`./${command.name}.js`)]; + + try { + const newCommand = require(`./${command.name}.js`); + message.client.commands.set(newCommand.name, newCommand); + message.channel.send(`<:NyabotSuccess:697211376740859914> **Reloaded \`${command.name}\` successfully!**`); + console.log('User reloaded ${command.name}.') + } catch (error) { + console.error(error); + message.channel.send(`<:AnitroxError:809651936563429416> There was an error while reloading \`${command.name}\`:\n\`${error.message}\``); + } + } else { + const embed = { + "title": "<:NyabotDenied:697145462565896194> **Access is denied**", + "color": 13632027, + "footer": { + "icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png", + "text": "Made with ❤ in Illinois | Anitrox by IDeletedSystem64" + }, + "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/shutdown.js b/commands/restart.js similarity index 58% rename from commands/shutdown.js rename to commands/restart.js index ad9aa77..009cc4a 100644 --- a/commands/shutdown.js +++ b/commands/restart.js @@ -1,13 +1,18 @@ module.exports = { - name: 'shutdown', + name: 'restart', description: '(Owner Only) Shuts down the bot.', execute(client, message, args) { + const { token } = require('../config.json'); if (message.author.id == 309427567004483586) { - message.channel.send(" Shutting Down...").then + message.channel.send(" Restarting...").then client.destroy() .catch(console.error) + .then + setTimeout(() => { client.login(token); }, 3000); + message.channel.send("<:NyabotSuccess:697211376740859914> Restart Successful") + console.log("All systems go") } else { message.channel.send("<:NyabotDenied:697145462565896194> Access Denied, You must be bot owner to execute this command."); } - }} \ No newline at end of file + }} diff --git a/commands/setnick.js b/commands/setnick.js new file mode 100644 index 0000000..a828250 --- /dev/null +++ b/commands/setnick.js @@ -0,0 +1,49 @@ +module.exports = { + name: 'setnick', + description: 'Sets your nickname', + execute(client, message, args) { + + 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, + "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": [ + { + "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 }); + }; + }; +}} diff --git a/commands/slap.js b/commands/slap.js index b1f0c37..106e0af 100644 --- a/commands/slap.js +++ b/commands/slap.js @@ -3,22 +3,45 @@ module.exports = { name: "slap", description: "Slaps an user!", execute(client, message, args) { - const messageAuthor = message.author + const {footerTxt} = require('../config.json'); const taggedUser = message.mentions.users.first(); - const embed = { +//--------------------------------------------------- + +//--------------------------------------------------- +const errorembed = { + "title": "<:AnitroxError:809651936563429416> Error", + "color": 13632027, + "footer": { + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt + }, + "fields": [ + { + "name": "Well that happened...", + "value": "You need to @mention an user!" + } + ] +}; + +if(!taggedUser) { + return message.channel.send({ embed: errorembed}); +// Checks if a user was mentioned. If not, returns error message. +} + + const embed = { "title": ":anger: Slap", - "description": taggedUser + " You have been slapped by " + messageAuthor + "!", - "color": 8311585, + "description": "<@" + taggedUser + "> You have been slapped by <@" + messageAuthor + ">!", + "color": 9442302, "footer": { - "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", - "text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021" + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt }, "image": { "url": "https://media1.tenor.com/images/b6d8a83eb652a30b95e87cf96a21e007/tenor.gif?itemid=10426943" } } - - - message.channel.send({ embed: embed }); + + + message.channel.send({ embed: embed }); } } diff --git a/commands/snuggle.js b/commands/snuggle.js new file mode 100644 index 0000000..583219c --- /dev/null +++ b/commands/snuggle.js @@ -0,0 +1,36 @@ +module.exports = { + + name: "snuggle", + description: "Snuggle an user!", + execute(client, message, args) { + const {footerTxt} = require('../config.json'); + const taggedUser = message.mentions.users.first(); + + // -------------------------------------- + const gifchoices = [ + "https://media.discordapp.net/attachments/803658122299572255/806775382995894282/anime-couple-snuggle-gif-5.gif?width=450&height=238", + "https://media.discordapp.net/attachments/803658122299572255/806775411928989726/snuggl1.gif", + "https://cdn.discordapp.com/attachments/803658122299572255/806775422833786911/ImpureDeepAmbushbug-small.gif" + + ]; + const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1); + var gif = (gifchoices[index]); + // --------------------------------------- + + const embed = { + "title": "<:BlobSnuggleCat:806759753450782731> Snuggle", + "description": "<@" + taggedUser + ">" + " You have been snuggled by " + "<@" + messageAuthor + ">!", + "color": 9442302, + "footer": { + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt + }, + "image": { + "url": gif + } + } + + + message.channel.send({ embed: embed }); + } + } \ No newline at end of file diff --git a/commands/stop.js b/commands/stop.js new file mode 100644 index 0000000..7b3fe5f --- /dev/null +++ b/commands/stop.js @@ -0,0 +1,32 @@ +module.exports = { + name: "stop", + description: "Stops the bot", + execute(client, message, args) { + if (message.author.id == 309427567004483586) { + const embed = { + "title": " **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 }); + setTimeout(function(){ + client.destroy() + }, 5000); + } else { + 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 diff --git a/commands/todo.txt b/commands/todo.txt deleted file mode 100644 index 8e3c09c..0000000 --- a/commands/todo.txt +++ /dev/null @@ -1 +0,0 @@ -This is really just to make a directory lol. diff --git a/commands/uinfo.js b/commands/uinfo.js new file mode 100644 index 0000000..0cb944f --- /dev/null +++ b/commands/uinfo.js @@ -0,0 +1,58 @@ +module.exports = { + name: "uinfo", + description: "Gets info about an user, such as ID, Discord Join date and more", + syntax: "", + execute(client, message, args) { + const {footerTxt} = require('../config.json'); + let user = message.mentions.users.first() || args[0] + if (!user) user = message.author + const embed = { + "title": "Everything you've ever wanted to know about " + user.username + "!", + "color": 9442302, + "footer": { + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt + }, + + "thumbnail": { + "url": user.displayAvatarURL() + }, + "fields": [ + + { + "name": "Username", + "value": user.username, + "inline": true + }, + { + "name": "Discriminator", + "value": user.discriminator, + "inline": true + }, + { + "name": "Full Username", + "value": user.tag, + "inline": true + }, + { + "name": "User Profile Picture", + "value": user.displayAvatarURL() + }, + { + "name": "User Status", + value: user.presence.status + }, + { + "name": "User ID", + "value": "``" + user.id + "``" + }, + { + "name": "User Joined Discord", + "value": user.createdAt, + inline: true + }, + ] + }; + message.channel.send({ embed: embed }); + } + } diff --git a/config-example.json b/config-example.json new file mode 100644 index 0000000..b6e2ed2 --- /dev/null +++ b/config-example.json @@ -0,0 +1,37 @@ +{ + "prefix": "n!", + "token": "IM SO EXCITED ABOUT BURGER", + "ownerID": "MY FAVORITE COLOR IS TWELVE", + "release": "anitrox_dev", + "build": "Stable", + "footerTxt": "Anitrox, made with <3 by IDeletedSystem64 | 2018-2022", + + "statuses": [ + "with np!help", + "with Sophie!", + "Trans Rights!", + "in your computer", + "with my internet router", + "ssh: system64@borkeonv2", + "YouTube", + "with source code", + "Visual Studio Code", + "Minecraft", + "with the network connections.", + "VLC Media Player", + "Chromium" +], +"locations": [ +"Microsoft", +"LinusTechTips", +"Linus Torvalds", +"borkeonv2", +"Google", +"192.168.1.1", +"127.0.0.1", +"Sophie's computer", +"Mars", +"Elon Musk", +"TMC Software" +] +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 6c89d67..0000000 --- a/package-lock.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "name": "nyabotcanary", - "version": "1.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "nyabotcanary", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "discord.js": "^11.5.1", - "node-os-utils": "^1.3.2" - } - }, - "node_modules/@discordjs/uws": { - "version": "10.149.0", - "resolved": "https://registry.npmjs.org/@discordjs/uws/-/uws-10.149.0.tgz", - "integrity": "sha512-N1wjoAD2DOgzevqzyTOWTgyO2divX03JWNQx4JHm/jQ/BRzZNkhwVRO3RC5Guww+srdgs4Tw4gwrzlJrlOhq/Q==", - "hasInstallScript": true, - "peer": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" - }, - "node_modules/discord.js": { - "version": "11.6.4", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-11.6.4.tgz", - "integrity": "sha512-cK6rH1PuGjSjpmEQbnpuTxq1Yv8B89SotyKUFcr4RhnsiZnfBfDOev7DD7v5vhtEyyj51NuMWFoRJzgy/m08Uw==", - "dependencies": { - "long": "^4.0.0", - "prism-media": "^0.0.4", - "snekfetch": "^3.6.4", - "tweetnacl": "^1.0.0", - "ws": "^6.0.0" - }, - "engines": { - "node": ">=6.0.0" - }, - "peerDependencies": { - "@discordjs/opus": "^0.1.0", - "@discordjs/uws": "^10.149.0", - "bufferutil": "^4.0.0", - "erlpack": "discordapp/erlpack", - "libsodium-wrappers": "^0.7.3", - "node-opus": "^0.2.7", - "opusscript": "^0.0.6", - "sodium": "^2.0.3" - }, - "peerDependenciesMeta": { - "@discordjs/opus": { - "optional": true - }, - "bufferutil": { - "optional": true - }, - "erlpack": { - "optional": true - }, - "libsodium-wrappers": { - "optional": true - }, - "node-opus": { - "optional": true - }, - "opusscript": { - "optional": true - }, - "sodium": { - "optional": true - }, - "uws": { - "optional": true - } - } - }, - "node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "node_modules/node-os-utils": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/node-os-utils/-/node-os-utils-1.3.2.tgz", - "integrity": "sha512-wUo/q6u77y9+DBaXkn57IDyJlQuN7xP6VU9h6yeIGhKocc9rDQPyc3WmLgX+x5jf4WmbLcEaA3raM05+v5jW3g==" - }, - "node_modules/prism-media": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.0.4.tgz", - "integrity": "sha512-dG2w7WtovUa4SiYTdWn9H8Bd4JNdei2djtkP/Bk9fXq81j5Q15ZPHYSwhUVvBRbp5zMkGtu0Yk62HuMcly0pRw==" - }, - "node_modules/snekfetch": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.4.tgz", - "integrity": "sha512-NjxjITIj04Ffqid5lqr7XdgwM7X61c/Dns073Ly170bPQHLm6jkmelye/eglS++1nfTWktpP6Y2bFXjdPlQqdw==", - "deprecated": "use node-fetch instead" - }, - "node_modules/tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" - }, - "node_modules/ws": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", - "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", - "dependencies": { - "async-limiter": "~1.0.0" - } - } - }, - "dependencies": { - "@discordjs/uws": { - "version": "10.149.0", - "resolved": "https://registry.npmjs.org/@discordjs/uws/-/uws-10.149.0.tgz", - "integrity": "sha512-N1wjoAD2DOgzevqzyTOWTgyO2divX03JWNQx4JHm/jQ/BRzZNkhwVRO3RC5Guww+srdgs4Tw4gwrzlJrlOhq/Q==", - "peer": true - }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" - }, - "discord.js": { - "version": "11.6.4", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-11.6.4.tgz", - "integrity": "sha512-cK6rH1PuGjSjpmEQbnpuTxq1Yv8B89SotyKUFcr4RhnsiZnfBfDOev7DD7v5vhtEyyj51NuMWFoRJzgy/m08Uw==", - "requires": { - "long": "^4.0.0", - "prism-media": "^0.0.4", - "snekfetch": "^3.6.4", - "tweetnacl": "^1.0.0", - "ws": "^6.0.0" - } - }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "node-os-utils": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/node-os-utils/-/node-os-utils-1.3.2.tgz", - "integrity": "sha512-wUo/q6u77y9+DBaXkn57IDyJlQuN7xP6VU9h6yeIGhKocc9rDQPyc3WmLgX+x5jf4WmbLcEaA3raM05+v5jW3g==" - }, - "prism-media": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.0.4.tgz", - "integrity": "sha512-dG2w7WtovUa4SiYTdWn9H8Bd4JNdei2djtkP/Bk9fXq81j5Q15ZPHYSwhUVvBRbp5zMkGtu0Yk62HuMcly0pRw==" - }, - "snekfetch": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.4.tgz", - "integrity": "sha512-NjxjITIj04Ffqid5lqr7XdgwM7X61c/Dns073Ly170bPQHLm6jkmelye/eglS++1nfTWktpP6Y2bFXjdPlQqdw==" - }, - "tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" - }, - "ws": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", - "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", - "requires": { - "async-limiter": "~1.0.0" - } - } - } -} diff --git a/package.json b/package.json index b9be2a5..45ac005 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,16 @@ { - "name": "nyabotcanary", + "name": "projectanitrox", "version": "1.0.0", "description": "Discord Bot Based on Discord.JS", - "main": "main.js", + "main": "start.js", "dependencies": { - "discord.js": "^11.5.1", - "node-os-utils": "^1.3.2" + "discord.js": "^12.5.1", + "node-os-utils": "^1.3.2", + "require-all": "^3.0.0" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "author": "Anthony Mondz", + "author": "IDeletedSystem64", "license": "ISC" } diff --git a/start.js b/start.js index f1b50a0..3c3169f 100644 --- a/start.js +++ b/start.js @@ -1,27 +1,12 @@ -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 = "Test Release 21"; -const release = "anitrox_unstable" +const { MessageActionRow, MessageButton } = require('discord.js') +const { statuses, build, release, prefix, token, footerTxt } = require('./config.json'); +const os = require("os"); + console.log('Starting!') const client = new Discord.Client(); client.commands = new Discord.Collection(); -const activities_list = [ - "with n!help", - "Where am I?", - "with Sylveons!", - "on my host's hard disk", - "with Happy", - "HAAAAAAAAPPPPPPPYYYYYYYYYYYYYYYYYYYY", - "Running on " + process.platform + " / " + os.version() + "!", - "with the tea machine", - "with Borked Computers", - "on Happy's main PC- wait shoot she's coming", - "btw I use Debian linux" -]; - const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); @@ -30,47 +15,51 @@ for (const file of commandFiles) { client.commands.set(command.name, command); } -client.on("error", (e) => console.error(e)); -client.on("warn", (e) => console.warn(e)); -client.on("debug", (e) => console.info(e)) +client.on("error", (e) => console.log("[ERROR]" + error(e))); +client.on("warn", (e) => ("[WARN]" + warn(e))); +// Log errors to console. client.once('ready', () => { - console.log('All systems go.'); + console.clear() + console.log(' ___ _ __ '); + console.log(' / | ____ (_) /__________ _ __'); + console.log(' / /| | / __ \/ / __/ ___/ __ \| |/_/'); + console.log(' / ___ |/ / / / / /_/ / / /_/ /> < '); + console.log('/_/ |_/_/ /_/_/\__/_/ \____/_/|_| ') + console.log(release + ", " + build) + console.log("All Systems Go. | Anitrox by IDeletedSystem64 | ALL MY CODE KEEPS BLOWING UP!"); }); + setInterval(() => { - const index = Math.floor(Math.random() * (activities_list.length - 1) + 1); - client.user.setActivity(activities_list[index]); -}, 20000); + const index = Math.floor(Math.random() * (statuses.length - 1) + 1); + client.user.setActivity(statuses[index]); +}, 20000); +// Picks a status from the config file +// Begin Command Handler client.on('message', message => { - if (!message.content.startsWith(prefix) || message.author.bot) return; + 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); + client.commands.get(command).execute(client, message, args, footerTxt, Discord); } catch (error) { + console.stack + const usr = message.author; const embed = { - "title": "<:NyabotError:697145462347661412> **An error occurred!**", + "title": "<:AnitroxError:809651936563429416> **Something went wrong!**", + "description": error.stack, "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" - }, - { - "name": "Error Info", - "value": error.message - } - ] - }; + "icon_url": message.author.displayAvatarURL(), + "text": footerTxt + " | Something went wrong! :(" + } + }; message.channel.send({ embed }); +// End Command Handler } });