From e73ceee0740d79716f035324961a8ca179e6a4dd Mon Sep 17 00:00:00 2001 From: baz Date: Sat, 13 Jul 2024 22:17:09 +0100 Subject: [PATCH] Update changelog to match globalchangelog --- commands/100-games/changelog.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/commands/100-games/changelog.js b/commands/100-games/changelog.js index 84a5452..0ed9d8c 100644 --- a/commands/100-games/changelog.js +++ b/commands/100-games/changelog.js @@ -25,14 +25,13 @@ module.exports = { for (const entry of changelogEntries) { const game = await checkGameStorageId(entry.gameId); - if (entry.oldStatus && entry.newStatus) { - // Status changed - desc = desc.concat(`:arrow_right: moved **${game.name}** from **${entry.oldStatus}** to **${entry.newStatus}** *(${entry.createdAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/')})*\n`); - } else if (!entry.oldStatus && entry.newStatus) { - // Created entry - desc = desc.concat(`:white_check_mark: added **${game.name}** to **${entry.newStatus}** *(${entry.createdAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/')})*\n`); - } else if (entry.oldStatus && !entry.newStatus) { - // Deleted Entry + if (entry.newStatus == 'planning') { + desc = desc.concat(`:pencil: planned **${game.name}** *(${entry.createdAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/')})*\n`); + } else if (entry.newStatus == 'playing') { + desc = desc.concat(`:video_game: started playing **${game.name}** *(${entry.createdAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/')})*\n`); + } else if (entry.newStatus == 'beat') { + desc = desc.concat(`:white_check_mark: beat **${game.name}** *(${entry.createdAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/')})*\n`); + } else if (!entry.newStatus) { desc = desc.concat(`:x: deleted **${game.name}** from **${entry.oldStatus}** *(${entry.createdAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/')})*\n`); } }