diff --git a/events/guildScheduledEvent.js b/events/guildScheduledEvent.js index d21dc21..2f6e804 100644 --- a/events/guildScheduledEvent.js +++ b/events/guildScheduledEvent.js @@ -11,20 +11,22 @@ client.on('guildScheduledEventCreate', async guildScheduledEvent =>{ .setImage(`https://cdn.discordapp.com/guild-events/${guildScheduledEvent.id}/${guildScheduledEvent.image}.png`) .addField('Description', `${guildScheduledEvent.description}`) - if(guildScheduledEvent.entityType !== 'EXTERNAL'){ + if(guildScheduledEvent.entityType !== 'EXTERNAL') + { embed.addField('Location', `${guildScheduledEvent.channel.name} - [Link](https://discordapp.com/channels/427865794467069962/${guildScheduledEvent.channelId})`) } - else{ - embed.addField('Location', `External - ${guildScheduledEvent.entityMetadata.location}`)} + else + { + embed.addField('Location', `External - ${guildScheduledEvent.entityMetadata.location}`) + } embed.addField('Start Date and Time', ` ${guildScheduledEvent.scheduledStartAt.toLocaleString('en-UK', { timeZone: "Europe/London" })}`, true) - if(guildScheduledEvent.scheduledEndAt !== null) { embed.addField('End Date and Time', `${guildScheduledEvent.scheduledEndAt.toLocaleString("en-UK", { timeZone: "Europe/London" })}`, true) } embed.addField('InviteURL', `${guildScheduledEvent.url}`) - + channel.send({ embeds: [embed]}) }) \ No newline at end of file