Skip to content

Commit

Permalink
fix(guildchannelmanager): remove reverse enum lookup (#7304)
Browse files Browse the repository at this point in the history
  • Loading branch information
suneettipirneni committed Jan 19, 2022
1 parent bd33ebb commit 857bba4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/discord.js/src/managers/GuildChannelManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -155,7 +154,7 @@ class GuildChannelManager extends CachedManager {
data: {
name,
topic,
type: intType,
type,
nsfw,
bitrate,
user_limit: userLimit,
Expand Down

0 comments on commit 857bba4

Please sign in to comment.