Skip to content

Commit

Permalink
fix(GuildScheduledEvent): handle missing image for v13 (#7627)
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Mar 24, 2022
1 parent 7814074 commit dfea9c2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/structures/GuildScheduledEvent.js
Expand Up @@ -157,11 +157,15 @@ class GuildScheduledEvent extends Base {
this.entityMetadata ??= null;
}

/**
* The cover image hash for this scheduled event
* @type {?string}
*/
this.image = data.image ?? null;
if ('image' in data) {
/**
* The cover image hash for this scheduled event
* @type {?string}
*/
this.image = data.image;
} else {
this.image ??= null;
}
}

/**
Expand Down

0 comments on commit dfea9c2

Please sign in to comment.