From 11297c7512d91851e6e74d26e7a5e1d8a0c51fbb Mon Sep 17 00:00:00 2001 From: Kieran Date: Sun, 4 Sep 2022 18:44:07 +0100 Subject: [PATCH] Update title and add timezone --- events/guildScheduledEvent.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/events/guildScheduledEvent.js b/events/guildScheduledEvent.js index e24b403..2e64b7c 100644 --- a/events/guildScheduledEvent.js +++ b/events/guildScheduledEvent.js @@ -8,9 +8,8 @@ client.on('guildScheduledEventCreate', async guildScheduledEvent =>{ .setColor('GREEN') .setFooter({text: `Created by ${guildScheduledEvent.creator.tag}`}) .setTimestamp() - .setTitle("New Event") + .setTitle(guildScheduledEvent.name) .setImage(`https://cdn.discordapp.com/guild-events/${guildScheduledEvent.id}/${guildScheduledEvent.image}.png`) - .addField('Name:', `${guildScheduledEvent.name}`) .addField('Description', `${guildScheduledEvent.description}`) if(guildScheduledEvent.entityType !== 'EXTERNAL') @@ -21,11 +20,11 @@ client.on('guildScheduledEventCreate', async guildScheduledEvent =>{ embed.addField('Location', `External - ${guildScheduledEvent.entityMetadata.location}`) } - embed.addField('Start Date and Time', ` ${guildScheduledEvent.scheduledStartAt.toLocaleString('en-UK')}`, true) + embed.addField('Start Date and Time', ` ${guildScheduledEvent.scheduledStartAt.toLocaleString('en-UK, BST', { timeZone: "Europe/London" })}`, true) if(guildScheduledEvent.scheduledEndAt !== null) { - embed.addField('End Date and Time', `${guildScheduledEvent.scheduledEndAt.toLocaleString("en-UK")}`, true) + embed.addField('End Date and Time', `${guildScheduledEvent.scheduledEndAt.toLocaleString("en-UK", { timeZone: "Europe/London" })}`, true) } embed.addField('InviteURL', `${guildScheduledEvent.url}`)