From 5b55ce2b31cfebb7ed0d8434575b0d7426022309 Mon Sep 17 00:00:00 2001 From: AndreMor8 Date: Sat, 12 Oct 2024 04:12:33 -0500 Subject: [PATCH] xd --- package.json | 2 +- src/events/interactions/interactionCreate.js | 4 ++-- src/events/members/guildMemberAdd.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 1d64658c..c27d87b6 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "cpu-stat": "2.0.1", "croner": "^4.4.0", "crypto-js": "^4.1.1", - "discord.js": "^14.3.0", + "discord.js": "^14.12.1", "dotenv": "^16.0.2", "execa": "^6.1.0", "express": "^4.18.1", diff --git a/src/events/interactions/interactionCreate.js b/src/events/interactions/interactionCreate.js index d61a4fa2..2fa0f179 100644 --- a/src/events/interactions/interactionCreate.js +++ b/src/events/interactions/interactionCreate.js @@ -128,11 +128,11 @@ export default async (bot, interaction) => { if (interaction.customId.startsWith("ww_hb")) { const [, , mode, id] = interaction.customId.split("_"); if (mode === "publish") { - const res = await fetch(`https://wubbworld.xyz/api/birthday-cards/${id}/publish`, { method: "PUT", headers: { "authorization": process.env.VERYS } }); + const res = await fetch(`${process.env.WUBBURL}birthday-cards/${id}/publish`, { method: "PUT", headers: { "authorization": process.env.VERYS } }); if (!res.ok) await interaction.reply({ content: `Error: ${await res.text()}` }); else await interaction.update({ embeds: [Discord.EmbedBuilder.from(interaction.message.embeds[0]).setColor("Green").setFooter({ text: "Approved on" }).setTimestamp(new Date())], components: [] }); } else if (mode === "reject") { - const res = await fetch(`https://wubbworld.xyz/api/birthday-cards/${id}/reject`, { method: "PUT", headers: { "authorization": process.env.VERYS } }); + const res = await fetch(`${process.env.WUBBURL}birthday-cards/${id}/reject`, { method: "PUT", headers: { "authorization": process.env.VERYS } }); if (!res.ok) await interaction.reply({ content: `Error: ${await res.text()}` }); else await interaction.update({ embeds: [Discord.EmbedBuilder.from(interaction.message.embeds[0]).setColor("Red").setFooter({ text: "Rejected on" }).setTimestamp(new Date())], components: [] }); } diff --git a/src/events/members/guildMemberAdd.js b/src/events/members/guildMemberAdd.js index 2913dd12..1c250ba8 100644 --- a/src/events/members/guildMemberAdd.js +++ b/src/events/members/guildMemberAdd.js @@ -61,7 +61,7 @@ export default async (bot, member) => { inviterId = inviter; if (inviter !== member.guild.id) { const t = bot.users.cache.get(inviter) || await bot.users.fetch(inviter).catch(() => { }); - if (t) inviterTag = t; + if (t) inviterTag = t.tag; } else { inviterTag = "System"; }