From ec9c572c292c1dbb8dda6f0279a11fc7748222b6 Mon Sep 17 00:00:00 2001 From: "Ean Milligan (Bastion)" Date: Sat, 29 Apr 2023 05:15:43 -0400 Subject: [PATCH] finalize retrofit system it may not be perfect, but it will work 'gud enuf' --- src/commands/setup.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/commands/setup.ts b/src/commands/setup.ts index 5795b10..a029957 100644 --- a/src/commands/setup.ts +++ b/src/commands/setup.ts @@ -253,8 +253,7 @@ The Discord Slash Command system will ensure you provide all the required detail const oldEvent = messages.get(oldEventId); if (oldEvent && oldEvent.embeds[0].fields && oldEvent.embeds[0].footer) { const eventMembers = [...getLfgMembers(oldEvent.embeds[0].fields[LfgEmbedIndexes.JoinedMembers].value), ...getLfgMembers(oldEvent.embeds[0].fields[LfgEmbedIndexes.AlternateMembers].value)] - const eventDateTime = new Date((oldEvent.embeds[0].fields[LfgEmbedIndexes.StartTime].value.split('tz#')[1] || ' ').slice(0, -1)); - console.log(oldEvent.embeds[0].fields[LfgEmbedIndexes.StartTime].value) + const eventDateTime = new Date(parseInt((oldEvent.embeds[0].fields[LfgEmbedIndexes.StartTime].value.split('tz#')[1] || ' ').slice(0, -1))); if (!isNaN(eventDateTime.getTime())) { const eventDateTimeStr = (oldEvent.embeds[0].fields[LfgEmbedIndexes.StartTime].value.split('](')[0] || ' ').slice(1); oldEvent.embeds[0].fields[LfgEmbedIndexes.StartTime].value = generateTimeFieldStr(eventDateTimeStr, eventDateTime);