From 78c22c3075415fae7154ce625a0656979e2725c4 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Tue, 20 Aug 2024 14:36:16 -0600 Subject: [PATCH] Fix messages, durr --- index.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/index.js b/index.js index d47d94d..281d049 100644 --- a/index.js +++ b/index.js @@ -193,7 +193,6 @@ Client.on("interactionCreate", async (interaction) => { userId = interaction.options.get("user").value reason = interaction.options.get("reason").value userInfo = await noblox.getPlayerInfo(userId) - console.log(userInfo) userThumbnail = await noblox.getPlayerThumbnail([userId], 720, "png", false, "body") db.get("SELECT * FROM bans WHERE userId = ?", [userId], (err, row) => { if (err) { @@ -234,7 +233,7 @@ Client.on("interactionCreate", async (interaction) => { } ] } - return interaction.reply({ embeds: [embed] }); + return interaction.reply({ embeds: [embed], ephemeral: true }); } }) } else if(row.banned === 0) { @@ -268,11 +267,11 @@ Client.on("interactionCreate", async (interaction) => { } ] } - return interaction.reply({ embeds: [embed] }); + return interaction.reply({ embeds: [embed], ephemeral: true }); } }) } else { - interaction.repl({ + interaction.reply({ content: "User is already banned.", ephemeral: true }) @@ -284,7 +283,6 @@ Client.on("interactionCreate", async (interaction) => { // If the user is banned, unban them userId = await interaction.options.get("user").value userInfo = await noblox.getPlayerInfo(userId) - console.log(userInfo) userThumbnail = await noblox.getPlayerThumbnail([userId], 720, "png", false, "body") db.get("SELECT * FROM bans WHERE userId = ?", [userId], (err, row) => { @@ -333,6 +331,7 @@ Client.on("interactionCreate", async (interaction) => { } ] } + return interaction.reply({ embeds: [embed], ephemeral: true }); } }) } else { @@ -383,9 +382,7 @@ Client.on("interactionCreate", async (interaction) => { } ] } - console.log(row) - console.log(``) - interaction.editReply({ embeds: [embed] }) + interaction.editReply({ embeds: [embed], ephemeral: true}) } else { embed = { title: "User is not banned", @@ -409,7 +406,7 @@ Client.on("interactionCreate", async (interaction) => { } ] } - interaction.editReply({ embeds: [embed] }) + interaction.editReply({ embeds: [embed], ephemeral: true}) } } else { embed = { @@ -429,7 +426,7 @@ Client.on("interactionCreate", async (interaction) => { } ] } - interaction.editReply({ embeds: [embed] }) + interaction.editReply({ embeds: [embed], ephemeral: true }) } } })