From cba3844c6f7a6b26c93d8061da0ca7fe6b291e92 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Sat, 6 Aug 2022 18:25:30 +0200 Subject: Resolve changes undone by rebasing from master --- util/src/entities/Channel.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/src/entities/Channel.ts') diff --git a/util/src/entities/Channel.ts b/util/src/entities/Channel.ts index 2a1e38a4..5ccb43ce 100644 --- a/util/src/entities/Channel.ts +++ b/util/src/entities/Channel.ts @@ -169,7 +169,7 @@ export class Channel extends BaseClass { } if (!opts?.skipNameChecks) { - const guild = await Guild.findOneOrFail({ id: channel.guild_id }); + const guild = await Guild.findOneOrFail({ where: { id: channel.guild_id } }); if (!guild.features.includes("ALLOW_INVALID_CHANNEL_NAMES") && channel.name) { for (let character of InvisibleCharacters) if (channel.name.includes(character)) @@ -194,7 +194,7 @@ export class Channel extends BaseClass { case ChannelType.GUILD_NEWS: case ChannelType.GUILD_VOICE: if (channel.parent_id && !opts?.skipExistsCheck) { - const exists = await Channel.findOneOrFail({ id: channel.parent_id }); + const exists = await Channel.findOneOrFail({ where: { id: channel.parent_id } }); if (!exists) throw new HTTPError("Parent id channel doesn't exist", 400); if (exists.guild_id !== channel.guild_id) throw new HTTPError("The category channel needs to be in the guild"); -- cgit 1.4.1