mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03: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);
|
parent &&= this.client.channels.resolveId(parent);
|
||||||
permissionOverwrites &&= permissionOverwrites.map(o => PermissionOverwrites.resolve(o, this.guild));
|
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;
|
storeChannelDeprecationEmitted = true;
|
||||||
process.emitWarning(
|
process.emitWarning(
|
||||||
// eslint-disable-next-line max-len
|
// eslint-disable-next-line max-len
|
||||||
@@ -155,7 +154,7 @@ class GuildChannelManager extends CachedManager {
|
|||||||
data: {
|
data: {
|
||||||
name,
|
name,
|
||||||
topic,
|
topic,
|
||||||
type: intType,
|
type,
|
||||||
nsfw,
|
nsfw,
|
||||||
bitrate,
|
bitrate,
|
||||||
user_limit: userLimit,
|
user_limit: userLimit,
|
||||||
|
|||||||
Reference in New Issue
Block a user