mirror of
https://github.com/stoatchat/javascript-client-api.git
synced 2026-07-18 16:14:27 -04:00
Add nsfw flags to channels / servers.
This commit is contained in:
@@ -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
@@ -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;
|
||||
}
|
||||
`),
|
||||
|
||||
@@ -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 & {
|
||||
|
||||
@@ -150,4 +150,9 @@ export type Server = {
|
||||
* Server banner
|
||||
*/
|
||||
banner?: Attachment
|
||||
|
||||
/**
|
||||
* Whether this server is marked as not safe for work
|
||||
*/
|
||||
nsfw?: boolean
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user