mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
fix: guild feature error in perms plugin
This commit is contained in:
@@ -68,7 +68,7 @@ export default function editChannel(bot: BotWithCache) {
|
|||||||
throw new Error("Only news and text types can be modified.");
|
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(
|
throw new Error(
|
||||||
"The NEWS feature is missing in this guild to be able to modify the channel type.",
|
"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 (options.autoArchiveDuration) {
|
||||||
if (guild) {
|
if (guild) {
|
||||||
if (
|
if (
|
||||||
!guild.features.includes(
|
!guild.toggles.has(
|
||||||
options.autoArchiveDuration === 4320
|
options.autoArchiveDuration === 4320 ? "threeDayThreadArchive" : "sevenDayThreadArchive",
|
||||||
? GuildFeatures.ThreeDayThreadArchive
|
|
||||||
: GuildFeatures.SevenDayThreadArchive,
|
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
|
|||||||
Reference in New Issue
Block a user