mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
fix: remove GuildChannel fallback, and remove GuildChannel as extendable (#3165)
* remake pr * typings
This commit is contained in:
@@ -60,7 +60,7 @@ class ChannelStore extends DataStore {
|
||||
const channel = Channel.create(this.client, data, guild);
|
||||
|
||||
if (!channel) {
|
||||
this.client.emit(Events.DEBUG, `Failed to find guild for channel ${data.id} ${data.type}`);
|
||||
this.client.emit(Events.DEBUG, `Failed to find guild, or unknown type for channel ${data.id} ${data.type}`);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -116,12 +116,8 @@ class Channel extends Base {
|
||||
channel = new CategoryChannel(guild, data);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
const GuildChannel = Structures.get('GuildChannel');
|
||||
channel = new GuildChannel(guild, data);
|
||||
}
|
||||
}
|
||||
guild.channels.set(channel.id, channel);
|
||||
if (channel) guild.channels.set(channel.id, channel);
|
||||
}
|
||||
}
|
||||
return channel;
|
||||
|
||||
@@ -75,7 +75,6 @@ const structures = {
|
||||
TextChannel: require('../structures/TextChannel'),
|
||||
VoiceChannel: require('../structures/VoiceChannel'),
|
||||
CategoryChannel: require('../structures/CategoryChannel'),
|
||||
GuildChannel: require('../structures/GuildChannel'),
|
||||
GuildMember: require('../structures/GuildMember'),
|
||||
Guild: require('../structures/Guild'),
|
||||
Message: require('../structures/Message'),
|
||||
|
||||
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
@@ -1735,7 +1735,6 @@ declare module 'discord.js' {
|
||||
TextChannel: typeof TextChannel;
|
||||
VoiceChannel: typeof VoiceChannel;
|
||||
CategoryChannel: typeof CategoryChannel;
|
||||
GuildChannel: typeof GuildChannel;
|
||||
GuildMember: typeof GuildMember;
|
||||
Guild: typeof Guild;
|
||||
Message: typeof Message;
|
||||
|
||||
Reference in New Issue
Block a user