Improve raw command handlers and remove dayjs dependency (switched to native Intl.DateTimeFormat API)

This commit is contained in:
lowlighter committed 2021-02-09 18:50:25 +01:00
1 parent 7d9d259f23
commit b80eecc3f5
10 files changed
+37 -21

No files matched your search

+1 -1
View File
@@ -154,7 +154,7 @@
name:track.name,
artist:track.artists[0].name,
artwork:track.album.images[0].url,
played_at:played_at ? imports.dayjs(played_at).format("[played at] HH:MM on DD/MM/YYYY") : null,
played_at:played_at ? `${imports.date(played_at, {timeStyle:"short", timeZone:data.config.timezone?.name})} on ${imports.date(played_at, {dateStyle:"short", timeZone:data.config.timezone?.name})}` : null,
}))
//Ensure no duplicate are added
for (const track of loaded) {