mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-30 15:30:09 +00:00
feat(Threads): add typed thread creation (#148)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@@ -515,7 +515,7 @@ export type RESTDeleteAPIChannelRecipientResult = unknown;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-with-message
|
||||
*/
|
||||
export interface RESTPostAPIChannelThreadsJSONBody {
|
||||
export interface RESTPostAPIChannelMessagesThreadsJSONBody {
|
||||
/**
|
||||
* 2-100 character thread name
|
||||
*/
|
||||
@@ -529,6 +529,21 @@ export interface RESTPostAPIChannelThreadsJSONBody {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-with-message
|
||||
*/
|
||||
export type RESTPostAPIChannelMessagesThreadsResult = APIChannel;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-without-message
|
||||
*/
|
||||
export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMessagesThreadsJSONBody {
|
||||
/**
|
||||
* The type of thread to create
|
||||
*/
|
||||
type: ChannelType.GuildNewsThread | ChannelType.GuildPublicThread | ChannelType.GuildPrivateThread;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-without-message
|
||||
*/
|
||||
export type RESTPostAPIChannelThreadsResult = APIChannel;
|
||||
|
||||
/**
|
||||
|
||||
@@ -515,7 +515,7 @@ export type RESTDeleteAPIChannelRecipientResult = unknown;
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-with-message
|
||||
*/
|
||||
export interface RESTPostAPIChannelThreadsJSONBody {
|
||||
export interface RESTPostAPIChannelMessagesThreadsJSONBody {
|
||||
/**
|
||||
* 2-100 character thread name
|
||||
*/
|
||||
@@ -529,6 +529,21 @@ export interface RESTPostAPIChannelThreadsJSONBody {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-with-message
|
||||
*/
|
||||
export type RESTPostAPIChannelMessagesThreadsResult = APIChannel;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-without-message
|
||||
*/
|
||||
export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMessagesThreadsJSONBody {
|
||||
/**
|
||||
* The type of thread to create
|
||||
*/
|
||||
type: ChannelType.GuildNewsThread | ChannelType.GuildPublicThread | ChannelType.GuildPrivateThread;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#start-thread-without-message
|
||||
*/
|
||||
export type RESTPostAPIChannelThreadsResult = APIChannel;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user