mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-23 15:13:05 +00:00
Merge branch 'master' of https://github.com/discord-open-source/discord-api
This commit is contained in:
commit
6ac4067c39
58 files changed
+944
-971
No files matched your search
@@ -10,7 +10,7 @@ export const ChannelModifySchema = {
|
||||
$position: Number,
|
||||
$permission_overwrites: [
|
||||
{
|
||||
id: BigInt,
|
||||
id: String,
|
||||
type: new Length(Number, 0, 1), // either 0 (role) or 1 (member)
|
||||
allow: BigInt,
|
||||
deny: BigInt,
|
||||
@@ -29,23 +29,23 @@ export interface ChannelModifySchema {
|
||||
rate_limit_per_user?: Number;
|
||||
position?: number;
|
||||
permission_overwrites?: {
|
||||
id: bigint;
|
||||
id: string;
|
||||
type: number;
|
||||
allow: bigint;
|
||||
deny: bigint;
|
||||
}[];
|
||||
parent_id?: bigint;
|
||||
parent_id?: string;
|
||||
nsfw?: boolean;
|
||||
}
|
||||
|
||||
export const ChannelGuildPositionUpdateSchema = [
|
||||
{
|
||||
id: BigInt,
|
||||
id: String,
|
||||
$position: Number,
|
||||
},
|
||||
];
|
||||
|
||||
export type ChannelGuildPositionUpdateSchema = {
|
||||
id: bigint;
|
||||
id: string;
|
||||
position?: number;
|
||||
}[];
|
||||
+18
-9
@@ -1,13 +1,22 @@
|
||||
import { ChannelSchema, GuildChannel } from "fosscord-server-util";
|
||||
import { Length } from "../util/instanceOf";
|
||||
|
||||
export const GuildCreateSchema = {
|
||||
name: new Length(String, 2, 100), // ! 2-100 chars
|
||||
name: new Length(String, 2, 100),
|
||||
$region: String, // auto complete voice region of the user
|
||||
$icon: String,
|
||||
$channels: [Object],
|
||||
$guild_template_code: String,
|
||||
$system_channel_id: String,
|
||||
};
|
||||
|
||||
export interface GuildCreateSchema {
|
||||
name: string;
|
||||
region?: string;
|
||||
icon?: string;
|
||||
channels?: GuildChannel[];
|
||||
guild_template_code?: string;
|
||||
system_channel_id?: string;
|
||||
}
|
||||
|
||||
export const GuildUpdateSchema = {
|
||||
@@ -20,27 +29,27 @@ export const GuildUpdateSchema = {
|
||||
$verification_level: Number,
|
||||
$default_message_notifications: Number,
|
||||
$system_channel_flags: Number,
|
||||
$system_channel_id: BigInt,
|
||||
$system_channel_id: String,
|
||||
$explicit_content_filter: Number,
|
||||
$public_updates_channel_id: BigInt,
|
||||
$public_updates_channel_id: String,
|
||||
$afk_timeout: Number,
|
||||
$afk_channel_id: BigInt,
|
||||
$afk_channel_id: String,
|
||||
};
|
||||
// @ts-ignore
|
||||
delete GuildUpdateSchema.$channels;
|
||||
|
||||
export interface GuildUpdateSchema extends GuildCreateSchema {
|
||||
export interface GuildUpdateSchema extends Omit<GuildCreateSchema, "channels"> {
|
||||
banner?: string;
|
||||
splash?: string;
|
||||
description?: string;
|
||||
features?: [string];
|
||||
icon?: string;
|
||||
verification_level?: number;
|
||||
default_message_notifications?: number;
|
||||
system_channel_flags?: number;
|
||||
system_channel_id?: bigint;
|
||||
explicit_content_filter?: number;
|
||||
public_updates_channel_id?: bigint;
|
||||
public_updates_channel_id?: string;
|
||||
afk_timeout?: number;
|
||||
afk_channel_id?: bigint;
|
||||
afk_channel_id?: string;
|
||||
}
|
||||
|
||||
export const GuildGetSchema = {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
export const InviteCreateSchema = {
|
||||
$target_user_id: String,
|
||||
$target_type: String,
|
||||
$validate: String, //? wtf is this
|
||||
$max_age: Number,
|
||||
$max_uses: Number,
|
||||
$temporary: Boolean,
|
||||
@@ -7,6 +10,9 @@ export const InviteCreateSchema = {
|
||||
$target_user_type: Number,
|
||||
};
|
||||
export interface InviteCreateSchema {
|
||||
target_user_id?: String;
|
||||
target_type?: String;
|
||||
validate?: String; //? wtf is this
|
||||
max_age?: Number;
|
||||
max_uses?: Number;
|
||||
temporary?: Boolean;
|
||||
|
||||
@@ -44,9 +44,9 @@ export const MessageCreateSchema = {
|
||||
},
|
||||
$allowed_mentions: [],
|
||||
$message_reference: {
|
||||
message_id: BigInt,
|
||||
channel_id: BigInt,
|
||||
$guild_id: BigInt,
|
||||
message_id: String,
|
||||
channel_id: String,
|
||||
$guild_id: String,
|
||||
$fail_if_not_exists: Boolean,
|
||||
},
|
||||
$payload_json: String,
|
||||
@@ -60,9 +60,9 @@ export interface MessageCreateSchema {
|
||||
embed?: Embed & { timestamp?: string };
|
||||
allowed_mentions?: [];
|
||||
message_reference?: {
|
||||
message_id: bigint;
|
||||
channel_id: bigint;
|
||||
guild_id?: bigint;
|
||||
message_id: string;
|
||||
channel_id: string;
|
||||
guild_id?: string;
|
||||
fail_if_not_exists: boolean;
|
||||
};
|
||||
payload_json?: string;
|
||||
|
||||
Reference in new issue
Block a user