mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-06-03 01:10:09 +00:00
feat(Threads): add default auto archive and minor tweaks (#142)
This commit is contained in:
@@ -132,6 +132,10 @@ export interface APIChannel extends APIPartialChannel {
|
||||
* The client users member for the thread, only included in select endpoints
|
||||
*/
|
||||
member?: APIThreadMember;
|
||||
/**
|
||||
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -616,10 +620,6 @@ export interface APIThreadMetadata {
|
||||
* Whether the thread is archived
|
||||
*/
|
||||
archived: boolean;
|
||||
/**
|
||||
* ID of the user that last archived or unarchived the thread
|
||||
*/
|
||||
archiver_id?: Snowflake;
|
||||
/**
|
||||
* Duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080
|
||||
*/
|
||||
|
||||
@@ -59,6 +59,8 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
GuildAlreadyHasTemplate = 30031,
|
||||
|
||||
MaximumThreadParticipants = 30033,
|
||||
|
||||
Unauthorized = 40001,
|
||||
VerifyYourAccount,
|
||||
|
||||
@@ -114,4 +116,9 @@ export enum RESTJSONErrorCodes {
|
||||
ReactionWasBlocked = 90001,
|
||||
|
||||
APIResourceOverloaded = 130000,
|
||||
|
||||
ThreadAlreadyCreatedForMessage = 160004,
|
||||
ThreadLocked,
|
||||
MaximumActiveThreads,
|
||||
MaximumActiveAnnoucementThreads,
|
||||
}
|
||||
|
||||
@@ -122,6 +122,12 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
* Channel types: newsThread, publicThread, privateThread
|
||||
*/
|
||||
locked?: boolean;
|
||||
/**
|
||||
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
|
||||
*
|
||||
* Channel types: text, news
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -132,6 +132,10 @@ export interface APIChannel extends APIPartialChannel {
|
||||
* The client users member for the thread, only included in select endpoints
|
||||
*/
|
||||
member?: APIThreadMember;
|
||||
/**
|
||||
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -616,10 +620,6 @@ export interface APIThreadMetadata {
|
||||
* Whether the thread is archived
|
||||
*/
|
||||
archived: boolean;
|
||||
/**
|
||||
* ID of the user that last archived or unarchived the thread
|
||||
*/
|
||||
archiver_id?: Snowflake;
|
||||
/**
|
||||
* Duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080
|
||||
*/
|
||||
|
||||
@@ -59,6 +59,8 @@ export const enum RESTJSONErrorCodes {
|
||||
|
||||
GuildAlreadyHasTemplate = 30031,
|
||||
|
||||
MaximumThreadParticipants = 30033,
|
||||
|
||||
Unauthorized = 40001,
|
||||
VerifyYourAccount,
|
||||
|
||||
@@ -114,4 +116,9 @@ export const enum RESTJSONErrorCodes {
|
||||
ReactionWasBlocked = 90001,
|
||||
|
||||
APIResourceOverloaded = 130000,
|
||||
|
||||
ThreadAlreadyCreatedForMessage = 160004,
|
||||
ThreadLocked,
|
||||
MaximumActiveThreads,
|
||||
MaximumActiveAnnoucementThreads,
|
||||
}
|
||||
|
||||
@@ -122,6 +122,12 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
* Channel types: newsThread, publicThread, privateThread
|
||||
*/
|
||||
locked?: boolean;
|
||||
/**
|
||||
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
|
||||
*
|
||||
* Channel types: text, news
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user