From eff758b3c3b5ef351c9efde5971cee1921f46670 Mon Sep 17 00:00:00 2001 From: Taken Date: Sun, 20 Oct 2024 10:06:40 +0200 Subject: [PATCH 1/3] Updated response messages --- src/commands/check.ts | 4 ++-- src/commands/guild/info.ts | 4 ++-- src/commands/guild/member.ts | 4 ++-- src/commands/guild/top.ts | 4 ++-- src/commands/staff/beast.ts | 4 ++-- src/commands/uuid.ts | 2 +- src/components/buttons/checkstats.ts | 2 +- src/utils/Functions/applicationquestions.ts | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/commands/check.ts b/src/commands/check.ts index 20bd04b..c18ff31 100644 --- a/src/commands/check.ts +++ b/src/commands/check.ts @@ -39,7 +39,7 @@ export default { if (!uuid) { interaction.editReply({ embeds: [{ - description: "That player doesn't exist.", + description: " That player does not exist.", color: embedColor }] }) @@ -58,7 +58,7 @@ export default { if (!player) { interaction.editReply({ embeds: [{ - description: "That player hasn't played Hypixel before.", + description: " That player hasn't played Hypixel before.", color: embedColor }] }) diff --git a/src/commands/guild/info.ts b/src/commands/guild/info.ts index 1950528..93eb38e 100644 --- a/src/commands/guild/info.ts +++ b/src/commands/guild/info.ts @@ -23,7 +23,7 @@ export default async function guildInfo(interaction: ChatInputCommandInteraction if (!uuid) { interaction.editReply({ embeds: [{ - description: "That player doen't exist!", + description: " That player does not exist.", color: embedColor }] }) @@ -41,7 +41,7 @@ export default async function guildInfo(interaction: ChatInputCommandInteraction if (!player) { interaction.editReply({ embeds: [{ - description: "That player has never joined the server!", + description: " That player hasn't played Hypixel before.", color: embedColor }] }) diff --git a/src/commands/guild/member.ts b/src/commands/guild/member.ts index ce6ea1a..869d5ea 100644 --- a/src/commands/guild/member.ts +++ b/src/commands/guild/member.ts @@ -19,7 +19,7 @@ export default async function guildMember(interaction: ChatInputCommandInteracti if (!uuid) { interaction.editReply({ embeds: [{ - description: "This user does not exist", + description: " That player does not exist.", color: embedColor }] }) @@ -38,7 +38,7 @@ export default async function guildMember(interaction: ChatInputCommandInteracti if (!player) { await interaction.editReply({ embeds: [{ - description: "This user never logged on to hypixel", + description: " That player hasn't played Hypixel before.", color: embedColor, thumbnail: { url: head! diff --git a/src/commands/guild/top.ts b/src/commands/guild/top.ts index 35a5227..1f75e73 100644 --- a/src/commands/guild/top.ts +++ b/src/commands/guild/top.ts @@ -25,7 +25,7 @@ export default async function guildTop(interaction: ChatInputCommandInteraction) if (!uuid) { interaction.editReply({ embeds: [{ - description: "That player doen't exist!", + description: " That player does not exist.", color: embedColor }] }) @@ -43,7 +43,7 @@ export default async function guildTop(interaction: ChatInputCommandInteraction) if (!player) { interaction.editReply({ embeds: [{ - description: "That player has never joined the server!", + description: " That player hasn't played Hypixel before.", color: embedColor }] }) diff --git a/src/commands/staff/beast.ts b/src/commands/staff/beast.ts index e68bfdf..2bdc6c6 100644 --- a/src/commands/staff/beast.ts +++ b/src/commands/staff/beast.ts @@ -24,7 +24,7 @@ export default async function beast(interaction: ChatInputCommandInteraction): P if (!uuid) { interaction.editReply({ embeds: [{ - description: "That player doesn't exist.", + description: " That player does not exist.", color: embedColor }] }) @@ -43,7 +43,7 @@ export default async function beast(interaction: ChatInputCommandInteraction): P if (!player) { interaction.editReply({ embeds: [{ - description: "That player hasn't played Hypixel before.", + description: " That player hasn't played Hypixel before.", color: embedColor }] }) diff --git a/src/commands/uuid.ts b/src/commands/uuid.ts index 2708f8f..f79b704 100644 --- a/src/commands/uuid.ts +++ b/src/commands/uuid.ts @@ -31,7 +31,7 @@ export default { if (!uuid) { interaction.editReply({ embeds: [{ - description: "That player doesn't exist!", + description: " That player does not exist.", color: embedColor }] }) diff --git a/src/components/buttons/checkstats.ts b/src/components/buttons/checkstats.ts index bfa8d07..5cabfe7 100644 --- a/src/components/buttons/checkstats.ts +++ b/src/components/buttons/checkstats.ts @@ -23,7 +23,7 @@ export default { if (!player) { interaction.editReply({ embeds: [{ - description: "That player hasn't played Hypixel before.", + description: " That player hasn't played Hypixel before.", color: embedColor }] }) diff --git a/src/utils/Functions/applicationquestions.ts b/src/utils/Functions/applicationquestions.ts index 6c4a9b4..b98a8df 100644 --- a/src/utils/Functions/applicationquestions.ts +++ b/src/utils/Functions/applicationquestions.ts @@ -59,7 +59,7 @@ export default async function applicationQuestions( if (!uuid) { await user.send({ embeds: [{ - description: "That is not a valid Minecraft username.\n" + + description: " That player does not exist." + "Application cancelled.", color: embedColor }] From b38d14c366b7cc41e38d86528d40d70bd6c5471c Mon Sep 17 00:00:00 2001 From: Taken Date: Sun, 20 Oct 2024 10:24:01 +0200 Subject: [PATCH 2/3] Minor tweaks --- src/commands/forceverify.ts | 19 ++++--------------- src/commands/remove.ts | 1 - src/commands/staff/beast.ts | 5 ----- src/commands/verify.ts | 10 ---------- 4 files changed, 4 insertions(+), 31 deletions(-) diff --git a/src/commands/forceverify.ts b/src/commands/forceverify.ts index 8a9a21a..dc2952a 100644 --- a/src/commands/forceverify.ts +++ b/src/commands/forceverify.ts @@ -20,11 +20,13 @@ export default { option .setName("user") .setDescription("The user to force verify.") + .setRequired(true) ) .addStringOption(option => option .setName("ign") .setDescription("The user's in-game name.") + .setRequired(true) ) .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setContexts(InteractionContextType.Guild), @@ -32,8 +34,8 @@ export default { async execute({ interaction }) { await interaction.deferReply() - const user = interaction.options.getMember("user") as GuildMember - const ign = interaction.options.getString("ign") + const user = interaction.options.getMember("user")! as GuildMember + const ign = interaction.options.getString("ign")! const mod = interaction.user const verifyData = await db.query.verifies.findFirst({ @@ -44,19 +46,6 @@ export default { return } - if (!user) { - interaction.editReply( - "Please provide a user to force verify.\n" + - "This can also mean the user is not in the server." - ) - return - } - - if (!ign) { - interaction.editReply("Please provide a player's IGN.") - return - } - const username = user.user.username const modName = mod.username diff --git a/src/commands/remove.ts b/src/commands/remove.ts index e251f98..f22e93d 100644 --- a/src/commands/remove.ts +++ b/src/commands/remove.ts @@ -26,7 +26,6 @@ export default { option .setName("reason") .setDescription("The reason for removing the user.") - .setRequired(false) ) .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setContexts(InteractionContextType.Guild), diff --git a/src/commands/staff/beast.ts b/src/commands/staff/beast.ts index 2bdc6c6..4b83355 100644 --- a/src/commands/staff/beast.ts +++ b/src/commands/staff/beast.ts @@ -8,11 +8,6 @@ export default async function beast(interaction: ChatInputCommandInteraction): P const ign = interaction.options.getString("ign")! - if (!ign) { - await interaction.editReply("Please provide a player's IGN.") - return - } - await interaction.editReply({ embeds: [{ description: "Fetching your uuid...", diff --git a/src/commands/verify.ts b/src/commands/verify.ts index 2de1410..3b9b8f9 100644 --- a/src/commands/verify.ts +++ b/src/commands/verify.ts @@ -41,16 +41,6 @@ export default { return } - if (!ign) { - interaction.editReply({ - embeds: [{ - description: " Please provide your in-game name.", - color: embedColor - }] - }) - return - } - await interaction.editReply({ embeds: [{ description: "Fetching your uuid...", From a5489eedee5d692383536801bc2d1950947ce77a Mon Sep 17 00:00:00 2001 From: Taken Date: Sun, 20 Oct 2024 10:25:48 +0200 Subject: [PATCH 3/3] More small tweaks --- src/commands/check.ts | 2 +- src/commands/staff/removeguildroles.ts | 2 +- src/utils/Autodeploy.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/check.ts b/src/commands/check.ts index c18ff31..ff105e0 100644 --- a/src/commands/check.ts +++ b/src/commands/check.ts @@ -24,7 +24,7 @@ export default { .setContexts(InteractionContextType.Guild), async execute({ interaction }) { - await interaction.deferReply({}) + await interaction.deferReply() const ign = interaction.options.getString("ign")! diff --git a/src/commands/staff/removeguildroles.ts b/src/commands/staff/removeguildroles.ts index 23f1622..b99e59d 100644 --- a/src/commands/staff/removeguildroles.ts +++ b/src/commands/staff/removeguildroles.ts @@ -35,7 +35,7 @@ export default async function removeGuildRoles(interaction: ChatInputCommandInte const hypixelGuildMembers = guildData.members.map(gmember => gmember.uuid) - const verifiedUsers = await db.query.verifies.findMany({}) + const verifiedUsers = await db.query.verifies.findMany() for (const gmember of guildMembers) { const gmemberuuid = verifiedUsers.find(user => user.userID === gmember.id)?.uuid diff --git a/src/utils/Autodeploy.ts b/src/utils/Autodeploy.ts index fb90944..5848800 100644 --- a/src/utils/Autodeploy.ts +++ b/src/utils/Autodeploy.ts @@ -50,7 +50,7 @@ export default async function autoDeployCommands(fileType: FileType, client: Ext client.on("ready", async (c) => { const guildclient = c.guilds.cache.get(env.dev.guildid)! - const currentCommands = await guildclient.commands.fetch({}) + const currentCommands = await guildclient.commands.fetch() if (!currentCommands) return const currentCommandsData = currentCommands.map(command => {