Fix random null crashes

imgbot
Kieran 2022-09-09 19:22:57 +01:00
parent 6f193136ce
commit 65a4f322c7
1 changed files with 6 additions and 3 deletions

View File

@ -8,9 +8,12 @@ client.on('guildScheduledEventCreate', async guildScheduledEvent =>{
.setTitle(guildScheduledEvent.name)
.setDescription(guildScheduledEvent.description)
.setColor('GREEN')
.setFooter({text: `Created by ${guildScheduledEvent.creator.tag}`})
.setTimestamp()
.setImage(`https://cdn.discordapp.com/guild-events/${guildScheduledEvent.id}/${guildScheduledEvent.image}.png?size=2048`)
if(interaction.user.tag !== null)
{
embed.setFooter({text: `Created by ${guildScheduledEvent.creator.tag}`})
}
embed.setTimestamp()
embed.setImage(`https://cdn.discordapp.com/guild-events/${guildScheduledEvent.id}/${guildScheduledEvent.image}.png?size=2048`)
if(guildScheduledEvent.entityType !== 'EXTERNAL')
{