helpers: add appliedTags to editHelper options (#2590)

This commit is contained in:
LTS20050703
2022-11-15 14:37:03 -06:00
committed by GitHub
parent 5a1887462d
commit f615e8520c
2 changed files with 9 additions and 0 deletions
@@ -40,6 +40,8 @@ export function editChannel(bot: BotWithCache) {
} else {
perms.push("MANAGE_THREADS");
}
if (options.appliedTags && options.appliedTags.length > 5) throw new Error("thread applied tags is limit to 5");
} else {
perms.push("MANAGE_CHANNELS");
@@ -69,6 +71,10 @@ export function editChannel(bot: BotWithCache) {
throw new Error("The parent id must be for a category channel type.");
}
}
if (options.availableTags && options.availableTags.length > 20) {
throw new Error("channel available tags is limited to 20");
}
}
requireBotChannelPermissions(bot, channel, perms);