From 3ad0dedd92e5fd8fac2c650c568b84cfdf7dbed9 Mon Sep 17 00:00:00 2001 From: Dominik K Date: Thu, 30 Nov 2023 17:35:18 +0100 Subject: [PATCH] fix: command footer crash --- src/buttons/dare.ts | 2 +- src/buttons/random.ts | 2 +- src/buttons/truth.ts | 2 +- src/commands/game/dare.ts | 6 ++++-- src/commands/game/higherlower.ts | 4 ++-- src/commands/game/neverhaveiever.ts | 2 +- src/commands/game/random.ts | 2 +- src/commands/game/truth.ts | 2 +- src/commands/game/wwyd.ts | 2 +- 9 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/buttons/dare.ts b/src/buttons/dare.ts index 23573acf..4906a516 100644 --- a/src/buttons/dare.ts +++ b/src/buttons/dare.ts @@ -67,7 +67,7 @@ const button: Button = { .setColor("#0598F6") .setFooter({ text: `Requested by ${interaction.user.username} | Type: Dare | ID: ${Random}`, - iconURL: interaction.user.avatarURL() || "", + iconURL: interaction.user.avatarURL() || undefined, }) .setDescription(bold(truthordare[Random])); diff --git a/src/buttons/random.ts b/src/buttons/random.ts index bd106bcc..a79999d2 100644 --- a/src/buttons/random.ts +++ b/src/buttons/random.ts @@ -66,7 +66,7 @@ const button: Button = { .setColor("#0598F6") .setFooter({ text: `Requested by ${interaction.user.username} | Type: Random | ID: ${Random}`, - iconURL: interaction.user.avatarURL() || "", + iconURL: interaction.user.avatarURL() || undefined, }) .setDescription(bold(truthordare[Random])); diff --git a/src/buttons/truth.ts b/src/buttons/truth.ts index db43edf8..1c760184 100644 --- a/src/buttons/truth.ts +++ b/src/buttons/truth.ts @@ -67,7 +67,7 @@ const button: Button = { .setColor("#0598F6") .setFooter({ text: `Requested by ${interaction.user.username} | Type: Truth | ID: ${Random}`, - iconURL: interaction.user.avatarURL() || "", + iconURL: interaction.user.avatarURL() || undefined, }) .setDescription(bold(truthordare[Random])); diff --git a/src/commands/game/dare.ts b/src/commands/game/dare.ts index 9560857e..b9d7b229 100644 --- a/src/commands/game/dare.ts +++ b/src/commands/game/dare.ts @@ -55,8 +55,10 @@ const command: ChatInputCommand = { const dareembed = new EmbedBuilder() .setColor("#0598F6") .setFooter({ - text: `Requested by ${interaction.user.username} | Type: Dare | ID: ${Random}`, - iconURL: interaction.user.avatarURL() || "", + text: `Requested by ${ + interaction.user.username || "Anonymous" + } | Type: Dare | ID: ${Random}`, + iconURL: interaction.user.avatarURL() || undefined, }) .setDescription(bold(truthordare[Random])); diff --git a/src/commands/game/higherlower.ts b/src/commands/game/higherlower.ts index 29007ece..c1ea7924 100644 --- a/src/commands/game/higherlower.ts +++ b/src/commands/game/higherlower.ts @@ -45,7 +45,7 @@ const command: ChatInputCommand = { ) .setFooter({ text: `Requested by ${interaction.user.username}`, - iconURL: interaction.user.avatarURL() || "", + iconURL: interaction.user.avatarURL() || undefined, }); interaction.reply({ embeds: [initembed] }).then(async () => { @@ -104,7 +104,7 @@ const command: ChatInputCommand = { .setColor("White") .setImage("attachment://game.png") .setFooter({ - iconURL: interaction.user.avatarURL() || "", + iconURL: interaction.user.avatarURL() || undefined, text: `${interaction.user.tag} | Game ID: ${game.id}`, }) .setTimestamp(); diff --git a/src/commands/game/neverhaveiever.ts b/src/commands/game/neverhaveiever.ts index a9e66f13..2251ef57 100644 --- a/src/commands/game/neverhaveiever.ts +++ b/src/commands/game/neverhaveiever.ts @@ -72,7 +72,7 @@ const command: ChatInputCommand = { .setColor("#0598F6") .setFooter({ text: `Requested by ${interaction.user.username} | Type: NHIE | ID: ${Random}`, - iconURL: interaction.user.avatarURL() || "", + iconURL: interaction.user.avatarURL() || undefined, }) .setDescription(bold(nererhaveIever[Random])); diff --git a/src/commands/game/random.ts b/src/commands/game/random.ts index 75d08866..8a5c98e8 100644 --- a/src/commands/game/random.ts +++ b/src/commands/game/random.ts @@ -59,7 +59,7 @@ const command: ChatInputCommand = { .setColor("#0598F6") .setFooter({ text: `Requested by ${interaction.user.username} | Type: Random | ID: ${Random}`, - iconURL: interaction.user.avatarURL() || "", + iconURL: interaction.user.avatarURL() || undefined, }) .setDescription(bold(truthordare[Random])); diff --git a/src/commands/game/truth.ts b/src/commands/game/truth.ts index b150f52a..58d6ae48 100644 --- a/src/commands/game/truth.ts +++ b/src/commands/game/truth.ts @@ -56,7 +56,7 @@ const command: ChatInputCommand = { .setColor("#0598F6") .setFooter({ text: `Requested by ${interaction.user.username} | Type: Truth | ID: ${Random}`, - iconURL: interaction.user.avatarURL() || "", + iconURL: interaction.user.avatarURL() || undefined, }) .setDescription(bold(truthordare[Random])); diff --git a/src/commands/game/wwyd.ts b/src/commands/game/wwyd.ts index a745010a..62867f68 100644 --- a/src/commands/game/wwyd.ts +++ b/src/commands/game/wwyd.ts @@ -59,7 +59,7 @@ const command: ChatInputCommand = { .setColor("#0598F6") .setFooter({ text: `Requested by ${interaction.user.username} | Type: WWYD | ID: ${Random}`, - iconURL: interaction.user.avatarURL() || "", + iconURL: interaction.user.avatarURL() || undefined, }) .setDescription(bold(whatwouldyoudo[Random]));