Skip to content

Commit 890b7da

Browse files
committed
dont leak token
1 parent 18ffe84 commit 890b7da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

interactions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,14 +483,14 @@ export async function handleInteraction(interaction: Interaction) {
483483
}
484484
return prev;
485485
}, { sum: {} as Record<string, number>, unique: {} as Record<string, number> });
486-
interaction.followUp(`${Object.entries(owners.sum).map(([ id, count ]) => `${steamNameMap[ id ] ?? id}: ${count} (${owners.unique[ id ] ?? 0} unique)`).join("\n")}\nTotal: ${apps.length} Games\nGames with only one owner: ${Object.values(owners.unique).reduce((a, b) => a + b)}`);
486+
interaction.channel?.isSendable() && interaction.channel.send(`${Object.entries(owners.sum).map(([ id, count ]) => `${steamNameMap[ id ] ?? id}: ${count} (${owners.unique[ id ] ?? 0} unique)`).join("\n")}\nTotal: ${apps.length} Games\nGames with only one owner: ${Object.values(owners.unique).reduce((a, b) => a + b)}`);
487487
} else {
488-
interaction.followUp("An error occurred while fetching the shared AppIDs.")
488+
interaction.channel?.isSendable() && interaction.channel.send("An error occurred while fetching the shared AppIDs.")
489489
}
490490
})
491491
.catch(err => {
492492
console.error(err);
493-
interaction.followUp("An error occurred while fetching the shared AppIDs.");
493+
interaction.channel?.isSendable() && interaction.channel.send("An error occurred while fetching the shared AppIDs.");
494494
});
495495

496496
}

0 commit comments

Comments
 (0)