mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
fix(Webhook): Resolve source guild only if cached (#6834)
This commit is contained in:
@@ -90,7 +90,7 @@ class Webhook {
|
|||||||
* The source guild of the webhook
|
* The source guild of the webhook
|
||||||
* @type {?(Guild|APIGuild)}
|
* @type {?(Guild|APIGuild)}
|
||||||
*/
|
*/
|
||||||
this.sourceGuild = this.client.guilds?._add(data.source_guild, false) ?? data.source_guild;
|
this.sourceGuild = this.client.guilds?.resolve(data.source_guild.id) ?? data.source_guild;
|
||||||
} else {
|
} else {
|
||||||
this.sourceGuild ??= null;
|
this.sourceGuild ??= null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user