make it configurable by guild feature flag

This commit is contained in:
Erkin Alp Güney
2022-04-24 09:10:22 +03:00
committed by GitHub
parent 2316002cd8
commit eca65393e8
+1 -1
View File
@@ -174,7 +174,7 @@ export class Channel extends BaseClass {
throw new HTTPError("Channel name cannot include invalid characters", 403);
// Categories skip these checks on discord.com
if (channel.type !== ChannelType.GUILD_CATEGORY) {
if (channel.type !== ChannelType.GUILD_CATEGORY || guild.features.includes("IRC_LIKE_CATEGORY_NAMES")) {
if (channel.name.includes(" "))
throw new HTTPError("Channel name cannot include invalid characters", 403);