fix: improve feedback type parsing from custom IDs and add validation for feedback types in interaction and view logic.

This commit is contained in:
syntaxbullet
2025-12-24 20:23:52 +01:00
parent 42d2313933
commit 5ab19bf826
2 changed files with 19 additions and 1 deletions

View File

@@ -94,6 +94,12 @@ export function buildFeedbackMessage(feedback: FeedbackData) {
};
const theme = themes[feedback.type];
if (!theme) {
console.error(`Unknown feedback type: ${feedback.type}`);
throw new Error(`Invalid feedback type: ${feedback.type}`);
}
const timestamp = Math.floor(feedback.timestamp.getTime() / 1000);
// Header Container