make it configurable by guild feature flag
This commit is contained in:
parent
655ea00ff4
commit
db4ed3bb6d
@ -203,7 +203,7 @@ export class Channel extends BaseClass {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Categories skip these checks on discord.com
|
// 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(" "))
|
if (channel.name.includes(" "))
|
||||||
throw new HTTPError(
|
throw new HTTPError(
|
||||||
"Channel name cannot include invalid characters",
|
"Channel name cannot include invalid characters",
|
||||||
@ -280,10 +280,10 @@ export class Channel extends BaseClass {
|
|||||||
Channel.create(channel).save(),
|
Channel.create(channel).save(),
|
||||||
!opts?.skipEventEmit
|
!opts?.skipEventEmit
|
||||||
? emitEvent({
|
? emitEvent({
|
||||||
event: "CHANNEL_CREATE",
|
event: "CHANNEL_CREATE",
|
||||||
data: channel,
|
data: channel,
|
||||||
guild_id: channel.guild_id,
|
guild_id: channel.guild_id,
|
||||||
} as ChannelCreateEvent)
|
} as ChannelCreateEvent)
|
||||||
: Promise.resolve(),
|
: Promise.resolve(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user