diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-08-06 18:25:30 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-08-09 23:28:27 +0200 |
commit | cba3844c6f7a6b26c93d8061da0ca7fe6b291e92 (patch) | |
tree | 515a4000f4d26ab1999644b9dd6a057e03041bcf /util/src/entities/Channel.ts | |
parent | migrate to DataSource (diff) | |
download | server-cba3844c6f7a6b26c93d8061da0ca7fe6b291e92.tar.xz |
Resolve changes undone by rebasing from master
Diffstat (limited to 'util/src/entities/Channel.ts')
-rw-r--r-- | util/src/entities/Channel.ts | 4 |
1 files changed, 2 insertions, 2 deletions
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"); |