From 9afa1b84efc0c01d2cf36c1ce99aa05174417a0b Mon Sep 17 00:00:00 2001 From: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com> Date: Sun, 20 Mar 2022 12:10:20 +0000 Subject: [PATCH] fix: guild feature error in perms plugin --- plugins/permissions/src/channels/editChannel.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/permissions/src/channels/editChannel.ts b/plugins/permissions/src/channels/editChannel.ts index fb96828ee..2e855fc80 100644 --- a/plugins/permissions/src/channels/editChannel.ts +++ b/plugins/permissions/src/channels/editChannel.ts @@ -68,7 +68,7 @@ export default function editChannel(bot: BotWithCache) { throw new Error("Only news and text types can be modified."); } - if (guild && !guild.features.includes(GuildFeatures.News)) { + if (guild && !guild.toggles.has("news")) { throw new Error( "The NEWS feature is missing in this guild to be able to modify the channel type.", ); @@ -104,10 +104,8 @@ export default function editChannel(bot: BotWithCache) { if (options.autoArchiveDuration) { if (guild) { if ( - !guild.features.includes( - options.autoArchiveDuration === 4320 - ? GuildFeatures.ThreeDayThreadArchive - : GuildFeatures.SevenDayThreadArchive, + !guild.toggles.has( + options.autoArchiveDuration === 4320 ? "threeDayThreadArchive" : "sevenDayThreadArchive", ) ) { throw new Error(