Skip to content

Commit

Permalink
xd
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreMor8 committed Oct 12, 2024
1 parent c9d3e56 commit 5b55ce2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/events/interactions/interactionCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [] });
}
Expand Down
2 changes: 1 addition & 1 deletion src/events/members/guildMemberAdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down

0 comments on commit 5b55ce2

Please # to comment.