From 0296dbff7746c4a4df2071f7e16ceeb53ca62ccb Mon Sep 17 00:00:00 2001 From: Taken Date: Sun, 7 Jan 2024 23:02:28 +0100 Subject: [PATCH 1/3] Removing useless forcestatis option --- src/commands/ban.ts | 8 ++++---- src/commands/clear.ts | 6 +++--- src/commands/counting/setup.ts | 4 ++-- src/commands/forceunverify.ts | 6 +++--- src/commands/forceverify.ts | 6 +++--- src/commands/guild/info.ts | 2 +- src/commands/kick.ts | 8 ++++---- src/commands/remove.ts | 8 ++++---- src/commands/setnick.ts | 8 ++++---- src/commands/setup.ts | 4 ++-- src/commands/slowmode.ts | 6 +++--- src/commands/staff.ts | 2 +- src/commands/staff/beast.ts | 2 +- src/commands/staff/help.ts | 4 ++-- src/commands/timeout.ts | 8 ++++---- src/commands/unban.ts | 6 +++--- src/components/buttons/guildapplicationaccept.ts | 4 ++-- src/components/buttons/guildapply.ts | 4 ++-- src/components/buttons/guildinactivitylog.ts | 4 ++-- src/components/buttons/staffapplicationaccept.ts | 4 ++-- src/components/buttons/staffapply.ts | 4 ++-- src/components/modals/denyreasonbox.ts | 4 ++-- src/components/modals/staffdenyreasonbox.ts | 4 ++-- src/components/modals/verifyModal.ts | 2 +- src/events/cron/weeklyGexp.ts | 2 +- src/events/server/guildMemberAdd/logNewJoins.ts | 4 ++-- src/events/server/voiceStateUpdate/vcJoinLeave.ts | 6 +++--- 27 files changed, 65 insertions(+), 65 deletions(-) diff --git a/src/commands/ban.ts b/src/commands/ban.ts index ee2d064..7a5dd8a 100644 --- a/src/commands/ban.ts +++ b/src/commands/ban.ts @@ -115,7 +115,7 @@ export = { embeds: [{ author: { name: mod.user.username, - icon_url: mod.user.avatarURL({ forceStatic: false }) || undefined, + icon_url: mod.user.avatarURL() || undefined, }, title: "Member Banned", description: ` @@ -126,12 +126,12 @@ export = { `, color: embedColor, thumbnail: { - url: mod.user.avatarURL({ forceStatic: false }) || "", + url: mod.user.avatarURL() || "", }, footer: { text: "ID: " + member.user.id, icon_url: - member.user.avatarURL({ forceStatic: false }) || + member.user.avatarURL() || undefined, }, timestamp: new Date().toISOString(), @@ -148,7 +148,7 @@ export = { "**Messages Deleted:** " + messageDeletionDays + " days", color: embedColor, thumbnail: { - url: member.user.avatarURL({ forceStatic: false }) || "", + url: member.user.avatarURL() || "", }, footer: { icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, diff --git a/src/commands/clear.ts b/src/commands/clear.ts index aead802..726fd4e 100644 --- a/src/commands/clear.ts +++ b/src/commands/clear.ts @@ -63,7 +63,7 @@ export = { embeds: [{ author: { name: interaction.user.username, - icon_url: interaction.user.avatarURL({ forceStatic: false }) || undefined, + icon_url: interaction.user.avatarURL() || undefined, }, title: "Messages Cleared", description: ` @@ -73,11 +73,11 @@ export = { `, color: embedColor, thumbnail: { - url: interaction.user.avatarURL({ forceStatic: false }) || "", + url: interaction.user.avatarURL() || "", }, footer: { text: "ID: " + channel.id, - icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, timestamp: new Date().toISOString() }] diff --git a/src/commands/counting/setup.ts b/src/commands/counting/setup.ts index 7c6704d..a0ef3c2 100644 --- a/src/commands/counting/setup.ts +++ b/src/commands/counting/setup.ts @@ -16,7 +16,7 @@ export default async function setup(interaction: ChatInputCommandInteraction): P description: "Counting channel has been updated to " + channelMention(channel.id), color: embedColor, footer: { - icon_url: interaction.guild!.iconURL({ forceStatic: false })!, + icon_url: interaction.guild!.iconURL()!, text: interaction.guild!.name + " | " + devMessage } }] @@ -35,7 +35,7 @@ export default async function setup(interaction: ChatInputCommandInteraction): P description: "Counting channel has been set to " + channelMention(channel.id), color: embedColor, footer: { - icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.guild!.name + " | " + devMessage } }] diff --git a/src/commands/forceunverify.ts b/src/commands/forceunverify.ts index bb4d2f8..ab8ce31 100644 --- a/src/commands/forceunverify.ts +++ b/src/commands/forceunverify.ts @@ -58,7 +58,7 @@ export = { title: "Force Unverified", author: { name: mod.username, - icon_url: mod.avatarURL({ forceStatic: false }) || undefined, + icon_url: mod.avatarURL() || undefined, }, description: ` **User:** ${userMention(member.user.id)} @@ -68,10 +68,10 @@ export = { `, color: embedColor, thumbnail: { - url: mod.avatarURL({ forceStatic: false }) || "", + url: mod.avatarURL() || "", }, footer: { - icon_url: member.user.avatarURL({ forceStatic: false }) || undefined, + icon_url: member.user.avatarURL() || undefined, text: "ID: " + member.user.id, }, timestamp: new Date().toISOString(), diff --git a/src/commands/forceverify.ts b/src/commands/forceverify.ts index 58c3347..a647bd7 100644 --- a/src/commands/forceverify.ts +++ b/src/commands/forceverify.ts @@ -186,7 +186,7 @@ export = { embeds: [{ author: { name: modName, - icon_url: mod.avatarURL({ forceStatic: false }) || undefined, + icon_url: mod.avatarURL() || undefined, }, title: "Force Verified", description: ` @@ -197,10 +197,10 @@ export = { `, color: embedColor, thumbnail: { - url: mod.avatarURL({ forceStatic: false }) || "", + url: mod.avatarURL() || "", }, footer: { - icon_url: user.user.avatarURL({ forceStatic: false }) || undefined, + icon_url: user.user.avatarURL() || undefined, text: "ID: " + user.user.id }, timestamp: new Date().toISOString(), diff --git a/src/commands/guild/info.ts b/src/commands/guild/info.ts index 023322b..b79a4d4 100644 --- a/src/commands/guild/info.ts +++ b/src/commands/guild/info.ts @@ -235,7 +235,7 @@ export default async function guildInfo( footer: { text: interaction.guild!.name + " | " + devMessage, icon_url: - interaction.guild!.iconURL({ forceStatic: false }) || + interaction.guild!.iconURL() || undefined, }, }, diff --git a/src/commands/kick.ts b/src/commands/kick.ts index 52c5731..5fb228b 100644 --- a/src/commands/kick.ts +++ b/src/commands/kick.ts @@ -82,7 +82,7 @@ export = { embeds: [{ author: { name: mod.user.username, - icon_url: mod.user.avatarURL({ forceStatic: false }) || undefined, + icon_url: mod.user.avatarURL() || undefined, }, title: "Member Kicked", description: ` @@ -92,11 +92,11 @@ export = { `, color: embedColor, thumbnail: { - url: mod.user.avatarURL({ forceStatic: false }) || "", + url: mod.user.avatarURL() || "", }, footer: { text: "ID: " + member.user.id, - icon_url: member.user.avatarURL({ forceStatic: false }) || undefined, + icon_url: member.user.avatarURL() || undefined, }, timestamp: new Date().toISOString(), }] @@ -111,7 +111,7 @@ export = { "**Moderator:** " + mod.user.username, color: embedColor, thumbnail: { - url: member.user.avatarURL({ forceStatic: false }) || "", + url: member.user.avatarURL() || "", }, footer: { icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, diff --git a/src/commands/remove.ts b/src/commands/remove.ts index b182bb9..eec8560 100644 --- a/src/commands/remove.ts +++ b/src/commands/remove.ts @@ -64,7 +64,7 @@ export = { embeds: [{ author: { name: mod.username, - icon_url: mod.avatarURL({ forceStatic: false }) || undefined, + icon_url: mod.avatarURL() || undefined, }, title: "Waiting List - Remove User", description: ` @@ -74,10 +74,10 @@ export = { `, color: embedColor, thumbnail: { - url: mod.avatarURL({ forceStatic: false }) || "", + url: mod.avatarURL() || "", }, footer: { - icon_url: user.avatarURL({ forceStatic: false }) || undefined, + icon_url: user.avatarURL() || undefined, text: "ID: " + user.id, }, timestamp: new Date().toISOString() @@ -94,7 +94,7 @@ export = { color: embedColor, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, } }, ], diff --git a/src/commands/setnick.ts b/src/commands/setnick.ts index 3887184..cd5e49e 100644 --- a/src/commands/setnick.ts +++ b/src/commands/setnick.ts @@ -52,7 +52,7 @@ export = { embeds: [{ author: { name: interaction.user.username, - icon_url: interaction.user.avatarURL({ forceStatic: false }) || undefined, + icon_url: interaction.user.avatarURL() || undefined, }, title: "Nickname", description: ` @@ -62,11 +62,11 @@ export = { `, color: embedColor, thumbnail: { - url: interaction.user.avatarURL({ forceStatic: false }) || "", + url: interaction.user.avatarURL() || "", }, footer: { text: "ID: " + member.user.id, - icon_url: member.user.avatarURL({ forceStatic: false }) || undefined, + icon_url: member.user.avatarURL() || undefined, }, timestamp: new Date().toISOString() }] @@ -78,7 +78,7 @@ export = { color: embedColor, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, } }], ephemeral: true, diff --git a/src/commands/setup.ts b/src/commands/setup.ts index f3e66c3..19db759 100644 --- a/src/commands/setup.ts +++ b/src/commands/setup.ts @@ -150,11 +150,11 @@ export = { description: description, color: embedColor, thumbnail: { - url: interaction.guild!.iconURL({ forceStatic: false }) || "", + url: interaction.guild!.iconURL() || "", }, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, } }], components: [ diff --git a/src/commands/slowmode.ts b/src/commands/slowmode.ts index 75b6976..d79ee0d 100644 --- a/src/commands/slowmode.ts +++ b/src/commands/slowmode.ts @@ -67,7 +67,7 @@ export = { embeds: [{ author: { name: interaction.user.username, - icon_url: interaction.user.avatarURL({ forceStatic: false }) || undefined, + icon_url: interaction.user.avatarURL() || undefined, }, title: "Slowmode Update", description: ` @@ -77,10 +77,10 @@ export = { `, color: embedColor, thumbnail: { - url: interaction.user.avatarURL({ forceStatic: false }) || "", + url: interaction.user.avatarURL() || "", }, footer: { - icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, text: " ID: " + channel.id }, timestamp: new Date().toISOString() diff --git a/src/commands/staff.ts b/src/commands/staff.ts index d39db4e..c6c712a 100644 --- a/src/commands/staff.ts +++ b/src/commands/staff.ts @@ -68,7 +68,7 @@ export = { color: embedColor, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], diff --git a/src/commands/staff/beast.ts b/src/commands/staff/beast.ts index f90783f..98c40e0 100644 --- a/src/commands/staff/beast.ts +++ b/src/commands/staff/beast.ts @@ -278,7 +278,7 @@ export default async function beast( }, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, fields: statsFields, }, diff --git a/src/commands/staff/help.ts b/src/commands/staff/help.ts index ca9dbdc..f54ed99 100644 --- a/src/commands/staff/help.ts +++ b/src/commands/staff/help.ts @@ -55,10 +55,10 @@ export default async function help( fields: commandList, color: embedColor, thumbnail: { - url: interaction.guild!.iconURL({ forceStatic: false }) || "", + url: interaction.guild!.iconURL() || "", }, footer: { - icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.guild?.name + " | " + devMessage, }, }, diff --git a/src/commands/timeout.ts b/src/commands/timeout.ts index 1755e55..45d17d8 100644 --- a/src/commands/timeout.ts +++ b/src/commands/timeout.ts @@ -143,7 +143,7 @@ const command: Command = { embeds: [{ author: { name: mod.user.username, - icon_url: mod.user.avatarURL({ forceStatic: false }) || undefined, + icon_url: mod.user.avatarURL() || undefined, }, title: title, description: ` @@ -154,11 +154,11 @@ const command: Command = { `, color: embedColor, thumbnail: { - url: mod.user.avatarURL({ forceStatic: false }) || "", + url: mod.user.avatarURL() || "", }, footer: { text: "ID: " + target.id, - icon_url: target.user.avatarURL({ forceStatic: false }) || undefined, + icon_url: target.user.avatarURL() || undefined, }, timestamp: new Date().toISOString() }] @@ -171,7 +171,7 @@ const command: Command = { color: embedColor, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], diff --git a/src/commands/unban.ts b/src/commands/unban.ts index 9fc9aaa..769e2f8 100644 --- a/src/commands/unban.ts +++ b/src/commands/unban.ts @@ -76,7 +76,7 @@ export = { { author: { name: mod.username, - icon_url: mod.avatarURL({ forceStatic: false }) || undefined, + icon_url: mod.avatarURL() || undefined, }, title: "Member Unbanned", description: ` @@ -86,7 +86,7 @@ export = { `, color: embedColor, thumbnail: { - url: mod.avatarURL({ forceStatic: false }) || "", + url: mod.avatarURL() || "", }, footer: { text: "ID: " + user!.id, @@ -107,7 +107,7 @@ export = { "**Moderator:** " + userMention(mod.id), color: embedColor, thumbnail: { - url: user!.avatarURL({ forceStatic: false }) || "", + url: user!.avatarURL() || "", }, footer: { icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, diff --git a/src/components/buttons/guildapplicationaccept.ts b/src/components/buttons/guildapplicationaccept.ts index 341203f..93bc002 100644 --- a/src/components/buttons/guildapplicationaccept.ts +++ b/src/components/buttons/guildapplicationaccept.ts @@ -143,10 +143,10 @@ export = { "Application has been accepted by <@" + user.id + ">.", color: embedColor, thumbnail: { - url: applicant.avatarURL({ forceStatic: false }) || "", + url: applicant.avatarURL() || "", }, footer: { - icon_url: guild.iconURL({ forceStatic: false }) || undefined, + icon_url: guild.iconURL() || undefined, text: "ID: " + applicant.id, }, }, diff --git a/src/components/buttons/guildapply.ts b/src/components/buttons/guildapply.ts index 2ffc9fc..3a74a9d 100644 --- a/src/components/buttons/guildapply.ts +++ b/src/components/buttons/guildapply.ts @@ -548,7 +548,7 @@ export = { " - Guild Application", color: embedColor, thumbnail: { - url: user.avatarURL({ forceStatic: false }) || "", + url: user.avatarURL() || "", }, fields: [ { @@ -585,7 +585,7 @@ export = { }, ], footer: { - icon_url: guild.iconURL({ forceStatic: false }) || "", + icon_url: guild.iconURL() || "", text: "ID: " + user.user.id, }, }, diff --git a/src/components/buttons/guildinactivitylog.ts b/src/components/buttons/guildinactivitylog.ts index a9949db..ab48503 100644 --- a/src/components/buttons/guildinactivitylog.ts +++ b/src/components/buttons/guildinactivitylog.ts @@ -317,7 +317,7 @@ module.exports = { " - Inactivity Application", color: embedColor, thumbnail: { - url: user.avatarURL({ forceStatic: false }) || "", + url: user.avatarURL() || "", }, fields: [ { @@ -334,7 +334,7 @@ module.exports = { }, ], footer: { - icon_url: user.avatarURL({ forceStatic: false }) || undefined, + icon_url: user.avatarURL() || undefined, text: "ID: " + user.user.id, }, }, diff --git a/src/components/buttons/staffapplicationaccept.ts b/src/components/buttons/staffapplicationaccept.ts index c4d3e8a..9b5e68c 100644 --- a/src/components/buttons/staffapplicationaccept.ts +++ b/src/components/buttons/staffapplicationaccept.ts @@ -59,10 +59,10 @@ export = { description: "Application accepted by <@" + user.id + ">.", color: embedColor, thumbnail: { - url: applicant.avatarURL({ forceStatic: false }) || "", + url: applicant.avatarURL() || "", }, footer: { - icon_url: guild.iconURL({ forceStatic: false }) || undefined, + icon_url: guild.iconURL() || undefined, text: "ID: " + applicantId, }, }, diff --git a/src/components/buttons/staffapply.ts b/src/components/buttons/staffapply.ts index 7573827..f77ad3f 100644 --- a/src/components/buttons/staffapply.ts +++ b/src/components/buttons/staffapply.ts @@ -476,7 +476,7 @@ export = { " - Staff Application", color: embedColor, thumbnail: { - url: user.avatarURL({ forceStatic: false }) || "", + url: user.avatarURL() || "", }, fields: [ { @@ -505,7 +505,7 @@ export = { }, ], footer: { - icon_url: guild.iconURL({ forceStatic: false }) || undefined, + icon_url: guild.iconURL() || undefined, text: "ID: " + user.user.id, }, }, diff --git a/src/components/modals/denyreasonbox.ts b/src/components/modals/denyreasonbox.ts index 7be2193..6bcfac1 100644 --- a/src/components/modals/denyreasonbox.ts +++ b/src/components/modals/denyreasonbox.ts @@ -83,9 +83,9 @@ export = { "`", ) .setColor(embedColor) - .setThumbnail(guild.iconURL({ forceStatic: false }) || "") + .setThumbnail(guild.iconURL() || "") .setFooter({ - iconURL: guild.iconURL({ forceStatic: false }) || undefined, + iconURL: guild.iconURL() || undefined, text: "ID: " + applicantId, }) diff --git a/src/components/modals/staffdenyreasonbox.ts b/src/components/modals/staffdenyreasonbox.ts index bdec733..05b701d 100644 --- a/src/components/modals/staffdenyreasonbox.ts +++ b/src/components/modals/staffdenyreasonbox.ts @@ -70,10 +70,10 @@ export = { "`", color: embedColor, thumbnail: { - url: applicant.avatarURL({ forceStatic: false }) || "", + url: applicant.avatarURL() || "", }, footer: { - icon_url: guild!.iconURL({ forceStatic: false }) || undefined, + icon_url: guild!.iconURL() || undefined, text: "ID: " + applicant.id, }, }, diff --git a/src/components/modals/verifyModal.ts b/src/components/modals/verifyModal.ts index f0597d3..8796c37 100644 --- a/src/components/modals/verifyModal.ts +++ b/src/components/modals/verifyModal.ts @@ -184,7 +184,7 @@ export = { url: head!, }, footer: { - icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.guild!.name + " | " + devMessage, }, }, diff --git a/src/events/cron/weeklyGexp.ts b/src/events/cron/weeklyGexp.ts index 7992224..b8df0d3 100644 --- a/src/events/cron/weeklyGexp.ts +++ b/src/events/cron/weeklyGexp.ts @@ -116,7 +116,7 @@ async function guildWeekly() { timestamp: new Date().toISOString(), footer: { text: channel.guild.name + " | " + devMessage, - icon_url: channel.guild.iconURL({ forceStatic: false }) || undefined, + icon_url: channel.guild.iconURL() || undefined, }, }, ], diff --git a/src/events/server/guildMemberAdd/logNewJoins.ts b/src/events/server/guildMemberAdd/logNewJoins.ts index 2f379d1..f8b4da0 100644 --- a/src/events/server/guildMemberAdd/logNewJoins.ts +++ b/src/events/server/guildMemberAdd/logNewJoins.ts @@ -23,11 +23,11 @@ export = { member.user.createdAt.toLocaleString(), color: embedColor, thumbnail: { - url: member.user.avatarURL({ forceStatic: false }) || "", + url: member.user.avatarURL() || "", }, footer: { text: "ID: " + member.id, - icon_url: member.user.avatarURL({ forceStatic: false }) || undefined, + icon_url: member.user.avatarURL() || undefined, }, timestamp: new Date().toISOString(), }, diff --git a/src/events/server/voiceStateUpdate/vcJoinLeave.ts b/src/events/server/voiceStateUpdate/vcJoinLeave.ts index 4b01b5e..1acd9a7 100644 --- a/src/events/server/voiceStateUpdate/vcJoinLeave.ts +++ b/src/events/server/voiceStateUpdate/vcJoinLeave.ts @@ -32,7 +32,7 @@ export = { color: embedColor, footer: { text: "ID: " + newState.member!.id, - icon_url: newState.member!.user.avatarURL({ forceStatic: false }) || undefined, + icon_url: newState.member!.user.avatarURL() || undefined, }, timestamp: new Date().toISOString(), }, @@ -50,7 +50,7 @@ export = { color: embedColor, footer: { text: "ID: " + oldState.member!.id, - icon_url: oldState.member!.user.avatarURL({ forceStatic: false }) || undefined, + icon_url: oldState.member!.user.avatarURL() || undefined, }, timestamp: new Date().toISOString(), }, @@ -72,7 +72,7 @@ export = { color: embedColor, footer: { text: "ID: " + oldState.member!.id, - icon_url: oldState.member!.user.avatarURL({ forceStatic: false }) || undefined, + icon_url: oldState.member!.user.avatarURL() || undefined, }, timestamp: new Date().toISOString(), }, From b3d9fcbc02e1a95d28eed11a762bf252a2f96e91 Mon Sep 17 00:00:00 2001 From: Taken Date: Sun, 7 Jan 2024 23:06:49 +0100 Subject: [PATCH 2/3] More forcestatic options removed --- src/commands-contextmenu/updateuser.ts | 6 +++--- src/commands/ban.ts | 2 +- src/commands/check.ts | 2 +- src/commands/counting.ts | 4 +--- src/commands/counting/ban.ts | 6 ++---- src/commands/counting/unban.ts | 6 ++---- src/commands/forceunverify.ts | 2 +- src/commands/forceupdate.ts | 8 +++----- src/commands/forceverify.ts | 2 +- src/commands/guild.ts | 4 +--- src/commands/guild/member.ts | 10 +++------- src/commands/guild/top.ts | 2 +- src/commands/help.ts | 4 ++-- src/commands/instructions.ts | 2 +- src/commands/kick.ts | 2 +- src/commands/ping.ts | 4 +--- src/commands/reqs.ts | 4 ++-- src/commands/send.ts | 6 +++--- src/commands/slowmode.ts | 7 ++----- src/commands/unban.ts | 4 ++-- src/commands/update.ts | 8 +++----- src/commands/uuid.ts | 2 +- src/commands/whoami.ts | 2 +- src/commands/whois.ts | 3 +-- src/utils/eventHandlers/autocomplete.ts | 4 +--- src/utils/eventHandlers/button.ts | 4 +--- src/utils/eventHandlers/command.ts | 4 +--- src/utils/eventHandlers/contextmenu.ts | 4 +--- src/utils/eventHandlers/modal.ts | 4 +--- 29 files changed, 45 insertions(+), 77 deletions(-) diff --git a/src/commands-contextmenu/updateuser.ts b/src/commands-contextmenu/updateuser.ts index 8af1d67..8d4ca34 100644 --- a/src/commands-contextmenu/updateuser.ts +++ b/src/commands-contextmenu/updateuser.ts @@ -34,7 +34,7 @@ export = { color: embedColor, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], @@ -87,7 +87,7 @@ export = { }, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], @@ -155,7 +155,7 @@ export = { }, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], diff --git a/src/commands/ban.ts b/src/commands/ban.ts index 7a5dd8a..1020b8d 100644 --- a/src/commands/ban.ts +++ b/src/commands/ban.ts @@ -151,7 +151,7 @@ export = { url: member.user.avatarURL() || "", }, footer: { - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.guild!.name + " | " + devMessage, }, }, diff --git a/src/commands/check.ts b/src/commands/check.ts index fc509f5..709d043 100644 --- a/src/commands/check.ts +++ b/src/commands/check.ts @@ -301,7 +301,7 @@ export = { }, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: true, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, fields: statsFields, }, diff --git a/src/commands/counting.ts b/src/commands/counting.ts index 87e0c43..909fe32 100644 --- a/src/commands/counting.ts +++ b/src/commands/counting.ts @@ -80,9 +80,7 @@ export = { footer: { text: interaction.guild!.name + " | " + devMessage, icon_url: - interaction.guild!.iconURL({ - forceStatic: false, - }) || undefined, + interaction.guild!.iconURL() || undefined, }, }, ], diff --git a/src/commands/counting/ban.ts b/src/commands/counting/ban.ts index d0454b1..7581377 100644 --- a/src/commands/counting/ban.ts +++ b/src/commands/counting/ban.ts @@ -21,9 +21,7 @@ export default async function ban( " is currently banned from counting", color: embedColor, footer: { - icon_url: interaction.guild!.iconURL({ - forceStatic: false, - })!, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.guild!.name + " | " + devMessage, }, }, @@ -40,7 +38,7 @@ export default async function ban( " has been banned from counting", color: embedColor, footer: { - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.guild!.name + " | " + devMessage, }, }, diff --git a/src/commands/counting/unban.ts b/src/commands/counting/unban.ts index 10d6cc5..613d6e8 100644 --- a/src/commands/counting/unban.ts +++ b/src/commands/counting/unban.ts @@ -21,9 +21,7 @@ export default async function ban( " is currently not banned from counting", color: embedColor, footer: { - icon_url: interaction.guild!.iconURL({ - forceStatic: false, - })!, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.guild!.name + " | " + devMessage, }, }, @@ -40,7 +38,7 @@ export default async function ban( " has been unbanned from counting", color: embedColor, footer: { - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.guild!.name + " | " + devMessage, }, }, diff --git a/src/commands/forceunverify.ts b/src/commands/forceunverify.ts index ab8ce31..63ea845 100644 --- a/src/commands/forceunverify.ts +++ b/src/commands/forceunverify.ts @@ -87,7 +87,7 @@ export = { color: embedColor, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], diff --git a/src/commands/forceupdate.ts b/src/commands/forceupdate.ts index 8addaf3..6a473df 100644 --- a/src/commands/forceupdate.ts +++ b/src/commands/forceupdate.ts @@ -45,7 +45,7 @@ export = { color: embedColor, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], @@ -100,9 +100,7 @@ export = { }, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ - forceStatic: false, - })!, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], @@ -170,7 +168,7 @@ export = { }, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], diff --git a/src/commands/forceverify.ts b/src/commands/forceverify.ts index a647bd7..b719dcf 100644 --- a/src/commands/forceverify.ts +++ b/src/commands/forceverify.ts @@ -222,7 +222,7 @@ export = { url: head!, }, footer: { - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.guild!.name + " | " + devMessage, }, }, diff --git a/src/commands/guild.ts b/src/commands/guild.ts index ac18c58..93cffc7 100644 --- a/src/commands/guild.ts +++ b/src/commands/guild.ts @@ -109,9 +109,7 @@ export = { footer: { text: interaction.guild!.name + " | " + devMessage, icon_url: - interaction.guild!.iconURL({ - forceStatic: false, - }) || undefined, + interaction.guild!.iconURL() || undefined, }, }, ], diff --git a/src/commands/guild/member.ts b/src/commands/guild/member.ts index 99f5fee..bbc4552 100644 --- a/src/commands/guild/member.ts +++ b/src/commands/guild/member.ts @@ -54,9 +54,7 @@ export default async function guildMember( }, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ - forceStatic: false, - })!, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], @@ -102,9 +100,7 @@ export default async function guildMember( }, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ - forceStatic: false, - })!, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], @@ -204,7 +200,7 @@ export default async function guildMember( ], footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], diff --git a/src/commands/guild/top.ts b/src/commands/guild/top.ts index 10936bd..266b3bc 100644 --- a/src/commands/guild/top.ts +++ b/src/commands/guild/top.ts @@ -286,7 +286,7 @@ export default async function guildTop( " | " + devMessage + cacheStatusText, - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], diff --git a/src/commands/help.ts b/src/commands/help.ts index e98382b..eacabdb 100644 --- a/src/commands/help.ts +++ b/src/commands/help.ts @@ -66,10 +66,10 @@ export = { fields: commandList, color: embedColor, thumbnail: { - url: interaction.guild!.iconURL({ forceStatic: true }) || "", + url: interaction.guild!.iconURL() || "", }, footer: { - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.guild!.name + " | " + devMessage, }, }, diff --git a/src/commands/instructions.ts b/src/commands/instructions.ts index af85d54..2ca075b 100644 --- a/src/commands/instructions.ts +++ b/src/commands/instructions.ts @@ -32,7 +32,7 @@ export = { color: embedColor, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, image: { url: instructionsgif, diff --git a/src/commands/kick.ts b/src/commands/kick.ts index 5fb228b..680f524 100644 --- a/src/commands/kick.ts +++ b/src/commands/kick.ts @@ -114,7 +114,7 @@ export = { url: member.user.avatarURL() || "", }, footer: { - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.guild!.name + " | " + devMessage, } }, diff --git a/src/commands/ping.ts b/src/commands/ping.ts index 897dfa9..dd4a1be 100644 --- a/src/commands/ping.ts +++ b/src/commands/ping.ts @@ -27,9 +27,7 @@ export = { footer: { text: interaction.guild!.name + " | " + devMessage, icon_url: - interaction.guild?.iconURL({ - forceStatic: false, - }) || undefined, + interaction.guild?.iconURL() || undefined, }, timestamp: new Date().toISOString(), }, diff --git a/src/commands/reqs.ts b/src/commands/reqs.ts index 6710eac..30ee333 100644 --- a/src/commands/reqs.ts +++ b/src/commands/reqs.ts @@ -35,7 +35,7 @@ export = { color: embedColor, thumbnail: { url: - interaction.guild!.iconURL({ forceStatic: false, }) || "", + interaction.guild!.iconURL() || "", }, fields: [ { @@ -70,7 +70,7 @@ export = { ], footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], diff --git a/src/commands/send.ts b/src/commands/send.ts index b5d2e55..dbc5a83 100644 --- a/src/commands/send.ts +++ b/src/commands/send.ts @@ -46,11 +46,11 @@ export = { description: message, color: embedColor, thumbnail: { - url: interaction.guild!.iconURL({ forceStatic: false, }) || "", + url: interaction.guild!.iconURL() || "", }, footer: { text: interaction.guild!.id + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: true }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], @@ -63,7 +63,7 @@ export = { color: embedColor, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], diff --git a/src/commands/slowmode.ts b/src/commands/slowmode.ts index d79ee0d..21060c5 100644 --- a/src/commands/slowmode.ts +++ b/src/commands/slowmode.ts @@ -53,9 +53,7 @@ export = { footer: { text: interaction.guild!.name + " | " + devMessage, icon_url: - interaction.guild!.iconURL({ - forceStatic: false, - }) || undefined, + interaction.guild!.iconURL() || undefined, }, }, ], @@ -95,8 +93,7 @@ export = { footer: { text: interaction.guild!.name + " | " + devMessage, icon_url: - interaction.guild!.iconURL({ forceStatic: true }) || - undefined, + interaction.guild!.iconURL() || undefined, }, }, ], diff --git a/src/commands/unban.ts b/src/commands/unban.ts index 769e2f8..a11ab5d 100644 --- a/src/commands/unban.ts +++ b/src/commands/unban.ts @@ -90,7 +90,7 @@ export = { }, footer: { text: "ID: " + user!.id, - icon_url: user.avatarURL({ forceStatic: false}) || undefined, + icon_url: user.avatarURL() || undefined, }, timestamp: new Date().toISOString(), }, @@ -110,7 +110,7 @@ export = { url: user!.avatarURL() || "", }, footer: { - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.guild!.name + " | " + devMessage, }, }, diff --git a/src/commands/update.ts b/src/commands/update.ts index 95908ae..d1f5106 100644 --- a/src/commands/update.ts +++ b/src/commands/update.ts @@ -33,7 +33,7 @@ export = { color: embedColor, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], @@ -75,9 +75,7 @@ export = { }, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ - forceStatic: false, - })!, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], @@ -144,7 +142,7 @@ export = { }, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], diff --git a/src/commands/uuid.ts b/src/commands/uuid.ts index dc97a7e..3831a1f 100644 --- a/src/commands/uuid.ts +++ b/src/commands/uuid.ts @@ -60,7 +60,7 @@ export = { }, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], diff --git a/src/commands/whoami.ts b/src/commands/whoami.ts index 75233a6..c8c725b 100644 --- a/src/commands/whoami.ts +++ b/src/commands/whoami.ts @@ -54,7 +54,7 @@ export = { }, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL({ forceStatic: true, }) || undefined, + icon_url: interaction.guild!.iconURL() || undefined, }, }, ], diff --git a/src/commands/whois.ts b/src/commands/whois.ts index 3d00d3e..efe81b4 100644 --- a/src/commands/whois.ts +++ b/src/commands/whois.ts @@ -60,8 +60,7 @@ export = { footer: { text: interaction.guild!.name + " | " + devMessage, icon_url: - interaction.guild!.iconURL({ forceStatic: true }) || - undefined, + interaction.guild!.iconURL() || undefined, }, }, ], diff --git a/src/utils/eventHandlers/autocomplete.ts b/src/utils/eventHandlers/autocomplete.ts index 834a35e..3d9dc3e 100644 --- a/src/utils/eventHandlers/autocomplete.ts +++ b/src/utils/eventHandlers/autocomplete.ts @@ -61,9 +61,7 @@ export default function loadAutocompleteEvents(client: Client, ft: FileType) { description: String(error), color: embedColor, footer: { - icon_url: interaction.guild!.iconURL({ - forceStatic: false, - })!, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.user.username + " | " + diff --git a/src/utils/eventHandlers/button.ts b/src/utils/eventHandlers/button.ts index 25d6917..427a771 100644 --- a/src/utils/eventHandlers/button.ts +++ b/src/utils/eventHandlers/button.ts @@ -49,9 +49,7 @@ export default function loadButtonEvents(client: Client, ft: FileType) { description: String(error), color: embedColor, footer: { - icon_url: interaction.guild!.iconURL({ - forceStatic: false, - })!, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.user.username + " | " + diff --git a/src/utils/eventHandlers/command.ts b/src/utils/eventHandlers/command.ts index 2532e00..ffe3bca 100644 --- a/src/utils/eventHandlers/command.ts +++ b/src/utils/eventHandlers/command.ts @@ -49,9 +49,7 @@ export default function loadSlashCommandsEvents(client: Client, ft: FileType) { description: String(error), color: embedColor, footer: { - icon_url: interaction.guild!.iconURL({ - forceStatic: false, - })!, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.user.username + " | " + diff --git a/src/utils/eventHandlers/contextmenu.ts b/src/utils/eventHandlers/contextmenu.ts index 403e835..29db098 100644 --- a/src/utils/eventHandlers/contextmenu.ts +++ b/src/utils/eventHandlers/contextmenu.ts @@ -56,9 +56,7 @@ export default function loadContextMenuEvents(client: Client, ft: FileType) { description: String(error), color: embedColor, footer: { - icon_url: interaction.guild!.iconURL({ - forceStatic: false, - })!, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.user.username + " | " + diff --git a/src/utils/eventHandlers/modal.ts b/src/utils/eventHandlers/modal.ts index 8241677..dbc6dd7 100644 --- a/src/utils/eventHandlers/modal.ts +++ b/src/utils/eventHandlers/modal.ts @@ -50,9 +50,7 @@ export default function loadModalEvents(client: Client, ft: FileType) { description: String(error), color: embedColor, footer: { - icon_url: interaction.guild!.iconURL({ - forceStatic: false, - })!, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.user.username + " | " + From cc2b39ff8e177c2cbd6b9cd81c54ec85374aaf0b Mon Sep 17 00:00:00 2001 From: Taken Date: Sun, 7 Jan 2024 23:07:53 +0100 Subject: [PATCH 3/3] Updated embed prefs --- src/commands/counting/setup.ts | 2 +- src/components/buttons/guildapplicationaccept.ts | 2 +- src/components/buttons/waitingListUpdate.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/counting/setup.ts b/src/commands/counting/setup.ts index a0ef3c2..187b7f5 100644 --- a/src/commands/counting/setup.ts +++ b/src/commands/counting/setup.ts @@ -16,7 +16,7 @@ export default async function setup(interaction: ChatInputCommandInteraction): P description: "Counting channel has been updated to " + channelMention(channel.id), color: embedColor, footer: { - icon_url: interaction.guild!.iconURL()!, + icon_url: interaction.guild!.iconURL() || undefined, text: interaction.guild!.name + " | " + devMessage } }] diff --git a/src/components/buttons/guildapplicationaccept.ts b/src/components/buttons/guildapplicationaccept.ts index 93bc002..26f92a9 100644 --- a/src/components/buttons/guildapplicationaccept.ts +++ b/src/components/buttons/guildapplicationaccept.ts @@ -126,7 +126,7 @@ export = { color: wlembed.color!, footer: { text: "Last updated by " + user.username, - icon_url: user.avatarURL()!, + icon_url: user.avatarURL() || undefined, }, thumbnail: wlembed.thumbnail!, fields: fields, diff --git a/src/components/buttons/waitingListUpdate.ts b/src/components/buttons/waitingListUpdate.ts index 24eb9bb..c74e905 100644 --- a/src/components/buttons/waitingListUpdate.ts +++ b/src/components/buttons/waitingListUpdate.ts @@ -45,7 +45,7 @@ export = { color: embed.color!, footer: { text: "Last updated by " + user.username, - icon_url: user.avatarURL()!, + icon_url: user.avatarURL() || undefined, }, thumbnail: embed.thumbnail!, fields: fields,