mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
fix(guildchannelmanager): remove reverse enum lookup (#7304)
This commit is contained in:
@@ -140,9 +140,8 @@ class GuildChannelManager extends CachedManager {
|
||||
) {
|
||||
parent &&= this.client.channels.resolveId(parent);
|
||||
permissionOverwrites &&= permissionOverwrites.map(o => PermissionOverwrites.resolve(o, this.guild));
|
||||
const intType = typeof type === 'number' ? type : ChannelType[type] ?? ChannelType.GuildText;
|
||||
|
||||
if (intType === ChannelType.GuildStore && !storeChannelDeprecationEmitted) {
|
||||
if (type === ChannelType.GuildStore && !storeChannelDeprecationEmitted) {
|
||||
storeChannelDeprecationEmitted = true;
|
||||
process.emitWarning(
|
||||
// eslint-disable-next-line max-len
|
||||
@@ -155,7 +154,7 @@ class GuildChannelManager extends CachedManager {
|
||||
data: {
|
||||
name,
|
||||
topic,
|
||||
type: intType,
|
||||
type,
|
||||
nsfw,
|
||||
bitrate,
|
||||
user_limit: userLimit,
|
||||
|
||||
Reference in New Issue
Block a user