fix(GuildScheduledEvent): handle missing image for v13 (#7627)

This commit is contained in:
Almeida
2022-03-24 19:59:19 +00:00
committed by GitHub
parent 78140748ce
commit dfea9c27ce

View File

@@ -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;
}
}
/**