🐛 fix Guild + Channel create

This commit is contained in:
Flam3rboy
2021-08-14 13:56:46 +02:00
parent 6db7620582
commit 96080e8786
3 changed files with 15 additions and 5 deletions
+2
View File
@@ -18,6 +18,7 @@ export const ChannelModifySchema = {
}
],
$parent_id: String,
$id: String, // kept for backwards compatibility does nothing (need for guild create)
$nsfw: Boolean
};
@@ -46,6 +47,7 @@ export interface ChannelModifySchema {
deny: bigint;
}[];
parent_id?: string;
id?: string; // is not used (only for guild create)
nsfw?: boolean;
}
+3 -2
View File
@@ -1,11 +1,12 @@
import { ChannelSchema, GuildChannel } from "@fosscord/util";
import { Length } from "../util/instanceOf";
import { ChannelModifySchema } from "./Channel";
export const GuildCreateSchema = {
name: new Length(String, 2, 100),
$region: String, // auto complete voice region of the user
$icon: String,
$channels: [Object],
$channels: [ChannelModifySchema],
$guild_template_code: String,
$system_channel_id: String,
$rules_channel_id: String
@@ -15,7 +16,7 @@ export interface GuildCreateSchema {
name: string;
region?: string;
icon?: string;
channels?: GuildChannel[];
channels?: ChannelModifySchema[];
guild_template_code?: string;
system_channel_id?: string;
rules_channel_id?: string;