Add nsfw flags to channels / servers.

This commit is contained in:
Paul
2021-08-16 13:56:48 +01:00
parent 0bee7c99a8
commit 21a4abced0
4 changed files with 42 additions and 2 deletions
+10
View File
@@ -51,6 +51,11 @@ resource('/channels/:channel', {
icon?: AutumnId;
/**
* Whether this channel is not safe for work
*/
nsfw?: boolean;
/**
* Field to remove from channel object
*/
@@ -433,6 +438,11 @@ resource('/channels/create', {
* @maxItems 49
*/
users?: string[];
/**
* Whether this group is not safe for work
*/
nsfw?: boolean;
}
`),
...await success('Group', ref("GroupChannel"))
+17 -2
View File
@@ -63,6 +63,11 @@ resource('/servers/:server', {
*/
system_messages?: SystemMessageChannels;
/**
* Whether this server is not safe for work
*/
nsfw?: boolean;
/**
* Field to remove from channel object
*/
@@ -92,19 +97,24 @@ resource('/servers/create', {
interface ${'ServerData'} {
/**
* Group name
* Server name
* @minLength 1
* @maxLength 32
*/
name: string;
/**
* Group description
* Server description
* @minLength 0
* @maxLength 1024
*/
description?: string;
/**
* Whether this server is not safe for work
*/
nsfw?: boolean;
nonce: Nonce;
}
`),
@@ -142,6 +152,11 @@ resource('/servers/:server/channels', {
*/
description?: string;
/**
* Whether this channel is not safe for work
*/
nsfw?: boolean;
nonce: Nonce;
}
`),
+10
View File
@@ -100,6 +100,11 @@ export type GroupChannel = {
* Permissions given to group members
*/
permissions?: number
/**
* Whether this channel is marked as not safe for work
*/
nsfw?: boolean
}
export type ServerChannel = {
@@ -136,6 +141,11 @@ export type ServerChannel = {
role_permissions?: {
[key: string]: number
}
/**
* Whether this channel is marked as not safe for work
*/
nsfw?: boolean
}
export type TextChannel = ServerChannel & {
+5
View File
@@ -150,4 +150,9 @@ export type Server = {
* Server banner
*/
banner?: Attachment
/**
* Whether this server is marked as not safe for work
*/
nsfw?: boolean
}