From 3651553256e199689eee7d261c91c17687e9c8ed Mon Sep 17 00:00:00 2001 From: Nathaniel Mason Date: Sat, 26 Mar 2022 16:02:17 +0000 Subject: [PATCH] change class constructors to json objects --- commands/8ball.js | 10 ++++------ commands/avatar.js | 6 ++---- commands/bonk.js | 10 ++++------ commands/cheese.js | 6 ++---- commands/cuddle.js | 6 ++---- commands/eval.js | 5 ++--- commands/help.js | 6 ++---- commands/hug.js | 10 ++++------ commands/info.js | 5 ++--- commands/invite.js | 6 ++---- commands/kiss.js | 10 ++++------ commands/leskiss.js | 10 ++++------ commands/lick.js | 10 ++++------ commands/nom.js | 10 ++++------ commands/opensource.js | 6 ++---- commands/pat.js | 10 ++++------ commands/ping.js | 5 ++--- commands/poke.js | 10 ++++------ commands/reload.js | 6 ++---- commands/setnick.js | 10 ++++------ commands/slap.js | 10 ++++------ commands/snuggle.js | 10 ++++------ commands/stop.js | 10 ++++------ commands/uinfo.js | 6 ++---- start.js | 4 ++-- 25 files changed, 76 insertions(+), 121 deletions(-) diff --git a/commands/8ball.js b/commands/8ball.js index b06b971..393aba5 100644 --- a/commands/8ball.js +++ b/commands/8ball.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require('discord.js'); - const answers = [ "Heck no!", "Are you crazy!? No!", @@ -31,14 +29,14 @@ module.exports = { console.log(args); if (!question) { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:AnitroxError:809651936563429416> **Something went wrong!**", "description": "You need to ask a question!", "color": 13632027, "footer": footer - })); + }}); } else { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": ":8ball: Anitrox 8 Ball", "description": "Your question: **" + question + "**", "color": 9442302, @@ -49,7 +47,7 @@ module.exports = { "value": answer } ] - })); + }}); } } } \ No newline at end of file diff --git a/commands/avatar.js b/commands/avatar.js index 7d4ab07..7d4b3ea 100644 --- a/commands/avatar.js +++ b/commands/avatar.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require('discord.js'); - module.exports = { name: "avatar", @@ -8,13 +6,13 @@ module.exports = { const user = message.mentions.users.first() || message.author; - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": ":frame_photo: " + user.username + "'s Beautiful Avatar!", "color": 9442302, "footer": footer, "image": { "url": user.displayAvatarURL() } - })); + }}); } } diff --git a/commands/bonk.js b/commands/bonk.js index cd7b524..c4236cf 100644 --- a/commands/bonk.js +++ b/commands/bonk.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require("discord.js"); - module.exports = { name: "bonk", @@ -8,7 +6,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:AnitroxError:809651936563429416> Error", "color": 13632027, "footer": { @@ -21,9 +19,9 @@ module.exports = { "value": "You need to @mention an user!" } ] - })); + }}); } else { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": " Bonk", "description": "<@" + taggedUser + ">" + " You have been bonked by <@" + message.author + ">!", "color": 9442302, @@ -31,7 +29,7 @@ module.exports = { "image": { "url": "https://cdn.discordapp.com/attachments/793537380330111028/801194481549312060/HappyBONK.gif" } - })); + }}); } } } diff --git a/commands/cheese.js b/commands/cheese.js index f6cd89e..9a0ea45 100644 --- a/commands/cheese.js +++ b/commands/cheese.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require("discord.js"); - module.exports = { name: "cheese", description: "Cheese an user, or run just ``n!cheese`` for a surprise :eyes:", @@ -8,7 +6,7 @@ module.exports = { if(!taggedUser) { await message.channel.send("*slams cheese on desk* Cheese. https://www.youtube.com/watch?v=Or4IE8fkpn4"); } else { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": ":cheese: Cheesed", "description": "<@" + taggedUser + ">" + " You got cheesed by " + "<@" + message.author + ">!", "color": 16312092, @@ -16,7 +14,7 @@ module.exports = { "image": { "url": "https://cdn.discordapp.com/attachments/803658122299572255/812867714368536636/R06325af354168febcafd96b8328b7590.png" } - })); + }}); } } } diff --git a/commands/cuddle.js b/commands/cuddle.js index 0eec8d3..f102261 100644 --- a/commands/cuddle.js +++ b/commands/cuddle.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require('discord.js'); - const gifchoices = [ "https://i.pinimg.com/originals/4d/89/d7/4d89d7f963b41a416ec8a55230dab31b.gif", "https://media1.tenor.com/images/6d73b0a9cadef5310be4b6160d2f959a/tenor.gif?itemid=12099823", @@ -20,7 +18,7 @@ module.exports = { if(!taggedUser) { await message.channel.send("<:AnitroxError:809651936563429416> You need to specify an user!"); } else { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": ":heart: Cuddle", "description": "<@" + taggedUser + ">" + " You have been cuddled by " + "<@" + message.author + ">!", "color": 9442302, @@ -28,7 +26,7 @@ module.exports = { "image": { "url": gif } - })); + }}); } } } diff --git a/commands/eval.js b/commands/eval.js index 543e340..529a432 100644 --- a/commands/eval.js +++ b/commands/eval.js @@ -1,4 +1,3 @@ -const { MessageEmbed } = require("discord.js"); const { inspect } = require("util"); module.exports = { @@ -12,7 +11,7 @@ module.exports = { const evaled = inspect(eval(code)); await message.channel.send(evaled, {code:"xl"}); } catch (error) { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:NyabotError:697145462347661412> **Well that happened...**", "color": 13632027, "footer": footer, @@ -26,7 +25,7 @@ module.exports = { "value": error.message } ] - })); + }}); } }; } diff --git a/commands/help.js b/commands/help.js index 465e857..ccd12c6 100644 --- a/commands/help.js +++ b/commands/help.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require("discord.js"); - module.exports = { name: 'help', @@ -7,7 +5,7 @@ module.exports = { syntax: '', async execute(_0, message, _1, footer) { - await message.channel.send(new MessageEmbed({ + await message.channel.send({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, @@ -22,6 +20,6 @@ module.exports = { "value": "Join the [support server!](https://discord.gg/grebRGsBZ3)" } ] - })); + }}); } } diff --git a/commands/hug.js b/commands/hug.js index 5934d0f..402ced8 100644 --- a/commands/hug.js +++ b/commands/hug.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require("discord.js"); - const gifchoices = [ "https://cdn.discordapp.com/attachments/803658122299572255/807670647920001044/hug2.gif", "https://cdn.discordapp.com/attachments/803658122299572255/807670797983285268/hug1.gif", @@ -16,7 +14,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:AnitroxError:809651936563429416> Error", "color": 9442302, "footer": { @@ -29,10 +27,10 @@ module.exports = { "value": "You need to @mention an user!" } ] - })); + }}); } else { const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)]; - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": " Hug", "description": "<@" + taggedUser + ">" + " You have been hugged by " + "<@" + message.author + ">!", "color": 8311585, @@ -40,7 +38,7 @@ module.exports = { "image": { "url": gif } - })); + }}); } } } diff --git a/commands/info.js b/commands/info.js index 3a249bb..6a39d70 100644 --- a/commands/info.js +++ b/commands/info.js @@ -1,4 +1,3 @@ -const { MessageEmbed } = require('discord.js'); const {build, release} = require('../config.json'); module.exports = { @@ -26,7 +25,7 @@ module.exports = { const os = require("os"); const osu = require('node-os-utils'); const cpu = osu.cpu; - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:AnitroxInfo:809651936831733791> Information about Anitrox", "description": "Everything you've ever wanted to know about your favorite bot, Anitrox!", "color": 9442302, @@ -101,6 +100,6 @@ module.exports = { } ] - })); + }}); } }; diff --git a/commands/invite.js b/commands/invite.js index 72aabdd..78b4acf 100644 --- a/commands/invite.js +++ b/commands/invite.js @@ -1,12 +1,10 @@ -const { MessageEmbed } = require("discord.js"); - module.exports = { name: 'invite', description: 'Add Anitrox to your beautiful server!', syntax: [], async execute(_0, message, _1, footer) { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "Add Anitrox to your Server!", "description": "Weather you want stable, or that squeaky clean fresh PTB build, we gotchu.", "color": 9442302, @@ -28,6 +26,6 @@ module.exports = { "value": "Come join the Anitrox Support Server, for support and much more!\n [Anitrox Support Server](https://discord.gg/grebRGsBZ3)" } ] - })); + }}); }, }; \ No newline at end of file diff --git a/commands/kiss.js b/commands/kiss.js index 7f8b6e0..fe5efd8 100644 --- a/commands/kiss.js +++ b/commands/kiss.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require("discord.js"); - const gifchoices = [ "https://cdn.discordapp.com/attachments/803658122299572255/807671954055626812/kiss5.gif", "https://cdn.discordapp.com/attachments/803658122299572255/807671956236140554/kiss2.gif", @@ -16,7 +14,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:AnitroxError:809651936563429416> Error", "color": 13632027, "footer": footer, @@ -26,10 +24,10 @@ module.exports = { "value": "You need to @mention an user!" } ] - })); + }}); } else { const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)]; - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": ":heart: Kiss", "description": "<@" + taggedUser + ">" + ", You have been kissed by <@" + message.author + ">!", "color": 9442302, @@ -37,7 +35,7 @@ module.exports = { "image": { "url": gif } - })); + }}); } } } diff --git a/commands/leskiss.js b/commands/leskiss.js index b257ce0..c16f007 100644 --- a/commands/leskiss.js +++ b/commands/leskiss.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require("discord.js"); - const gifchoices = [ "https://cdn.discordapp.com/attachments/793537380330111028/803833954750038066/gif5.gif", "https://cdn.discordapp.com/attachments/793537380330111028/803833959338475550/gif12.gif", @@ -26,7 +24,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:AnitroxError:809651936563429416> Error", "color": 9442302, "footer": footer, @@ -36,10 +34,10 @@ module.exports = { "value": "You need to @mention an user!" } ] - })); + }}); } else { const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)]; - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": ":heart: <:lesbian:803831629428686849> Kiss", "description": "<@" + taggedUser + ">" + " You have been kissed by <@" + message.author + ">! <:lesbian:803831629428686849>", "color": 8311585, @@ -47,7 +45,7 @@ module.exports = { "image": { "url": gif } - })); + }}); } } } diff --git a/commands/lick.js b/commands/lick.js index 907ce3b..21b4c5d 100644 --- a/commands/lick.js +++ b/commands/lick.js @@ -1,5 +1,3 @@ -const { MessageEmbed, Message } = require("discord.js"); - const gifchoices = [ "https://cdn.discordapp.com/attachments/803658122299572255/805314244123951114/cef569820773b0f5d54ee34cfa18e1f8.gif", "https://cdn.lowgif.com/full/2027501b8fa5225c-.gif", @@ -15,7 +13,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:AnitroxError:809651936563429416> Error", "color": 9442302, "footer": footer, @@ -25,10 +23,10 @@ module.exports = { "value": "You need to @mention an user!" } ] - })); + }}); } else { const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)]; - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": " Lick", "description": "<@" + taggedUser + "> You have been licked by <@" + message.author + ">!", "color": 8311585, @@ -36,7 +34,7 @@ module.exports = { "image": { "url": "https://cdn.discordapp.com/attachments/803658122299572255/805314244123951114/cef569820773b0f5d54ee34cfa18e1f8.gif" } - })); + }}); } } } diff --git a/commands/nom.js b/commands/nom.js index fe862dc..19857a7 100644 --- a/commands/nom.js +++ b/commands/nom.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require('discord.js'); - const gifchoices = [ "https://i.imgur.com/Ns1RBzX.gif", "https://cdn.lowgif.com/full/2027501b8fa5225c-.gif", @@ -15,7 +13,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:AnitroxError:809651936563429416> Error", "color": 9442302, "footer": footer, @@ -25,10 +23,10 @@ module.exports = { "value": "You need to @mention an user!" } ] - })); + }}); } else { const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)]; - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:BlobNomBlob:801241117919805510> Nom", "description": "<@" + taggedUser + "> You have been nommed by <@" + messageAuthor + ">!", "color": 8311585, @@ -36,7 +34,7 @@ module.exports = { "image": { "url": gif } - })); + }}); } } } diff --git a/commands/opensource.js b/commands/opensource.js index 096128a..1c52f85 100644 --- a/commands/opensource.js +++ b/commands/opensource.js @@ -1,10 +1,8 @@ -const { MessageEmbed } = require("discord.js"); - module.exports = { name: 'opensource', description: 'Attributions to open source components used by Anitrox', async execute(_0, message, _1, footer){ - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "Component Attribution", "description": "Some parts of Anitrox are using open source code, and their attributions are avaliable here!", "color": 52508, @@ -26,6 +24,6 @@ module.exports = { "value": "Using and supporting the Anitrox Project, thank you! ❤" } ] - })); + }}); } } \ No newline at end of file diff --git a/commands/pat.js b/commands/pat.js index cc1ab0b..d5024a3 100644 --- a/commands/pat.js +++ b/commands/pat.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require("discord.js"); - const gifchoices = [ "https://cdn.discordapp.com/attachments/803658122299572255/803708174293008474/tenor.gif", "https://community.gamepress.gg/uploads/default/original/3X/0/a/0a762099c5ad6de9ca5f13dd22a7e45884a99eb3.gif", @@ -14,7 +12,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:AnitroxError:809651936563429416> Error", "color": 9442302, "footer": footer, @@ -24,10 +22,10 @@ module.exports = { "value": "You need to @mention an user!" } ] - })); + }}); } else { const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)]; - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:pats:801238281286713355> Pat", "description": "<@" + taggedUser + "> You have been patted by <@" + messageAuthor + ">!", "color": 8311585, @@ -35,7 +33,7 @@ module.exports = { "image": { "url": gif } - })); + }}); } } } diff --git a/commands/ping.js b/commands/ping.js index 6e46014..57b20c5 100644 --- a/commands/ping.js +++ b/commands/ping.js @@ -1,4 +1,3 @@ -const { MessageEmbed } = require('discord.js'); const { locations } = require('../config.json'); module.exports = { @@ -8,11 +7,11 @@ module.exports = { const index = Math.floor(Math.random() * locations.length); const pingLocation = locations[index] - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed:{ "title": ":ping_pong: Ping", "description": "**Pong!** We pinged **" + pingLocation + "** and got " + client.ws.ping + " ms.", "color": 9442302, "footer": footer - })); + }}); } }; diff --git a/commands/poke.js b/commands/poke.js index ee133b7..f338634 100644 --- a/commands/poke.js +++ b/commands/poke.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require("discord.js"); - const gifchoices = [ "https://i.pinimg.com/originals/b4/95/fb/b495fb19f4b9a1b04f48297b676c497b.gif", "https://i.imgur.com/H7Ok5tn.gif", @@ -14,7 +12,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:AnitroxError:809651936563429416> Error", "color": 9442302, "footer": footer, @@ -24,10 +22,10 @@ module.exports = { "value": "You need to @mention an user!" } ] - })); + }}); } else { const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)]; - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "👉 Poke!", "description": "<@" + taggedUser + "> You have been poked by <@" + message.author + ">!", "color": 8311585, @@ -35,7 +33,7 @@ module.exports = { "image": { "url": gif } - })); + }}); } } } diff --git a/commands/reload.js b/commands/reload.js index a9c9754..b8e1e09 100644 --- a/commands/reload.js +++ b/commands/reload.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require("discord.js"); - module.exports = { name: 'reload', description: 'Reloads a command', @@ -26,7 +24,7 @@ module.exports = { } } } else { - message.channel.send(new MessageEmbed({ + message.channel.send({embed: { "title": "<:NyabotDenied:697145462565896194> **Access is denied**", "color": 13632027, "footer": footer, @@ -36,7 +34,7 @@ module.exports = { "value": "You don't have the appropriate permissions to run this command!" } ] - })); + }}); } } }; \ No newline at end of file diff --git a/commands/setnick.js b/commands/setnick.js index 43238ba..1d1d204 100644 --- a/commands/setnick.js +++ b/commands/setnick.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require("discord.js"); - module.exports = { name: 'setnick', description: 'Sets your nickname', @@ -10,7 +8,7 @@ module.exports = { try { await 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.") - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:AnitroxSuccess:809651936819019796> Nickname Changed", "color": 9442302, "footer": footer, @@ -25,9 +23,9 @@ module.exports = { "inline": true } ] - })); + }}); } catch (error) { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:AnitroxDenied:809651936642203668> Well that happened...", "color": 13632027, "footer": footer, @@ -37,7 +35,7 @@ module.exports = { "value": "You need to have permission ``CHANGE_NICKNAME`` to change your nick!" } ] - })); + }}); }; }; } diff --git a/commands/slap.js b/commands/slap.js index 75ad264..9f57976 100644 --- a/commands/slap.js +++ b/commands/slap.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require("discord.js"); - module.exports = { name: "slap", @@ -8,7 +6,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:AnitroxError:809651936563429416> Error", "color": 13632027, "footer": footer, @@ -18,9 +16,9 @@ module.exports = { "value": "You need to @mention an user!" } ] - })); + }}); } else { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": ":anger: Slap", "description": "<@" + taggedUser + "> You have been slapped by <@" + messageAuthor + ">!", "color": 9442302, @@ -28,7 +26,7 @@ module.exports = { "image": { "url": "https://media1.tenor.com/images/b6d8a83eb652a30b95e87cf96a21e007/tenor.gif?itemid=10426943" } - })); + }}); } } } diff --git a/commands/snuggle.js b/commands/snuggle.js index 02d894f..f9f0e51 100644 --- a/commands/snuggle.js +++ b/commands/snuggle.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require('discord.js'); - 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", @@ -15,7 +13,7 @@ module.exports = { const taggedUser = message.mentions.users.first(); if(!taggedUser) { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:AnitroxError:809651936563429416> Error", "color": 13632027, "footer": footer, @@ -25,9 +23,9 @@ module.exports = { "value": "You need to @mention an user!" } ] - })); + }}); } else { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "<:BlobSnuggleCat:806759753450782731> Snuggle", "description": "<@" + taggedUser + ">" + " You have been snuggled by " + "<@" + messageAuthor + ">!", "color": 9442302, @@ -35,7 +33,7 @@ module.exports = { "image": { "url": gif } - })); + }}); } } } \ No newline at end of file diff --git a/commands/stop.js b/commands/stop.js index 467b45a..72e5d4d 100644 --- a/commands/stop.js +++ b/commands/stop.js @@ -1,24 +1,22 @@ -const { MessageEmbed } = require("discord.js"); - module.exports = { name: "stop", description: "Stops the bot", async execute(client, message, _, footer) { if (message.author.id == 309427567004483586 || message.author.id == 475558313376088064) { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": " **Shutting Down...**", "description": "See you next time!", "color": 9442302, "footer": footer - })); + }}); client.destroy(); } else { - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": ":AnitroxDenied: Access Denied", "description": "You need to be the bot owner to execute this command!", "color": 13632027, "footer": footer - })); + }}); } } } \ No newline at end of file diff --git a/commands/uinfo.js b/commands/uinfo.js index 02ff83b..31e735f 100644 --- a/commands/uinfo.js +++ b/commands/uinfo.js @@ -1,5 +1,3 @@ -const { MessageEmbed } = require("discord.js"); - module.exports = { name: "uinfo", description: "Gets info about an user, such as ID, Discord Join date and more", @@ -7,7 +5,7 @@ module.exports = { async execute(client, message, args, footer) { console.log(args[0]) const user = message.mentions.users.first() || client.users.cache.get(args[0]) || message.author - await message.channel.send(new MessageEmbed({ + await message.channel.send({embed: { "title": "Everything you've ever wanted to know about " + user.username + "!", "color": 9442302, "footer": footer, @@ -49,6 +47,6 @@ module.exports = { inline: true }, ] - })); + }}); } } diff --git a/start.js b/start.js index 9ae17ca..4d2a77a 100755 --- a/start.js +++ b/start.js @@ -34,10 +34,10 @@ client.once('ready', () => { }); -setInterval(() => { +setInterval(async () => { // Picks a status from the config file const index = Math.floor(Math.random() * statuses.length); - client.user.setActivity(statuses[index]); + await client.user.setActivity(statuses[index]); }, 20000); // Begin Command Handler