mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(GuildScheduledEvent): handle missing image for v13 (#7627)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user