feat(threads): add invitable (#185)

This commit is contained in:
Advaith
2021-08-22 02:32:31 -07:00
committed by GitHub
parent f2b58acbf8
commit b6babf2ee2
4 changed files with 28 additions and 0 deletions

View File

@@ -608,6 +608,10 @@ export interface APIThreadMetadata {
* Whether the thread is locked; when a thread is locked, only users with `MANAGE_THREADS` can unarchive it
*/
locked?: boolean;
/**
* Whether non-moderators can add other non-moderators to the thread; only available on private threads
*/
invitable?: boolean;
}
export enum ThreadAutoArchiveDuration {

View File

@@ -130,6 +130,12 @@ export interface RESTPatchAPIChannelJSONBody {
* Channel types: text, news
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration;
/**
* Whether non-moderators can add other non-moderators to the thread
*
* Channel types: privateThread
*/
invitable?: boolean;
}
/**
@@ -603,6 +609,10 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
* @default 12
*/
type?: ChannelType.GuildNewsThread | ChannelType.GuildPublicThread | ChannelType.GuildPrivateThread;
/**
* Whether non-moderators can add other non-moderators to the thread; only available when creating a private thread
*/
invitable?: boolean;
}
/**

View File

@@ -608,6 +608,10 @@ export interface APIThreadMetadata {
* Whether the thread is locked; when a thread is locked, only users with `MANAGE_THREADS` can unarchive it
*/
locked?: boolean;
/**
* Whether non-moderators can add other non-moderators to the thread; only available on private threads
*/
invitable?: boolean;
}
export const enum ThreadAutoArchiveDuration {

View File

@@ -130,6 +130,12 @@ export interface RESTPatchAPIChannelJSONBody {
* Channel types: text, news
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration;
/**
* Whether non-moderators can add other non-moderators to the thread
*
* Channel types: privateThread
*/
invitable?: boolean;
}
/**
@@ -603,6 +609,10 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
* @default 12
*/
type?: ChannelType.GuildNewsThread | ChannelType.GuildPublicThread | ChannelType.GuildPrivateThread;
/**
* Whether non-moderators can add other non-moderators to the thread; only available when creating a private thread
*/
invitable?: boolean;
}
/**