mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01:00
fix(ThreadChannel): better property handling (#6172)
This commit is contained in:
@@ -126,7 +126,7 @@ class Channel extends Base {
|
||||
return ThreadChannelTypes.includes(this.type);
|
||||
}
|
||||
|
||||
static create(client, data, guild, allowUnknownGuild) {
|
||||
static create(client, data, guild, { allowUnknownGuild, fromInteraction }) {
|
||||
if (!CategoryChannel) CategoryChannel = require('./CategoryChannel');
|
||||
if (!DMChannel) DMChannel = require('./DMChannel');
|
||||
if (!NewsChannel) NewsChannel = require('./NewsChannel');
|
||||
@@ -176,7 +176,7 @@ class Channel extends Base {
|
||||
case ChannelTypes.GUILD_NEWS_THREAD:
|
||||
case ChannelTypes.GUILD_PUBLIC_THREAD:
|
||||
case ChannelTypes.GUILD_PRIVATE_THREAD: {
|
||||
channel = new ThreadChannel(guild, data, client);
|
||||
channel = new ThreadChannel(guild, data, client, fromInteraction);
|
||||
if (!allowUnknownGuild) channel.parent?.threads.cache.set(channel.id, channel);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user