Compare commits

...

2 Commits

Author SHA1 Message Date
github-actions[bot]
72a78a4f6f chore(release): 0.37.65 🎉 (#852)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-23 14:21:14 +02:00
Jiralite
957488134e fix(TextChannelType): Remove forum and media channels (#849)
* fix: remove forum and media channels from text channel types

* refactor: extend `APIGuildChannel` instead
2023-11-21 17:42:53 +00:00
16 changed files with 151 additions and 31 deletions

View File

@@ -1,3 +1,9 @@
## [0.37.65](https://github.com/discordjs/discord-api-types/compare/0.37.64...0.37.65) (2023-11-23)
### Bug Fixes
- **TextChannelType:** Remove forum and media channels ([#849](https://github.com/discordjs/discord-api-types/issues/849)) ([9574881](https://github.com/discordjs/discord-api-types/commit/957488134e48c482324e9678dd53c11bf946b6cd))
## [0.37.64](https://github.com/discordjs/discord-api-types/compare/0.37.63...0.37.64) (2023-11-20)
### Features

View File

@@ -1,3 +1,9 @@
## [0.37.65](https://github.com/discordjs/discord-api-types/compare/0.37.64...0.37.65) (2023-11-23)
### Bug Fixes
- **TextChannelType:** Remove forum and media channels ([#849](https://github.com/discordjs/discord-api-types/issues/849)) ([9574881](https://github.com/discordjs/discord-api-types/commit/957488134e48c482324e9678dd53c11bf946b6cd))
## [0.37.64](https://github.com/discordjs/discord-api-types/compare/0.37.63...0.37.64) (2023-11-20)
### Features

View File

@@ -48,10 +48,8 @@ export type TextChannelType =
| ChannelType.PrivateThread
| ChannelType.AnnouncementThread
| ChannelType.GuildText
| ChannelType.GuildForum
| ChannelType.GuildVoice
| ChannelType.GuildStageVoice
| ChannelType.GuildMedia;
| ChannelType.GuildStageVoice;
export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
@@ -112,7 +110,7 @@ export interface APIGuildChannel<T extends ChannelType> extends Omit<APIChannelB
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
export interface APIGuildTextChannel<T extends GuildTextChannelType>
export interface APIGuildTextChannel<T extends GuildTextChannelType | ChannelType.GuildForum | ChannelType.GuildMedia>
extends Omit<APITextBasedChannel<T>, 'name'>,
APIGuildChannel<T> {
/**
@@ -125,7 +123,7 @@ export interface APIGuildTextChannel<T extends GuildTextChannelType>
*/
default_thread_rate_limit_per_user?: number;
/**
* The channel topic (0-4096 characters for thread-only channels, 0-1024 characters for all others)
* The channel topic (0-1024 characters)
*/
topic?: string | null;
}
@@ -318,11 +316,40 @@ export enum ForumLayoutType {
}
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
extends APIGuildTextChannel<T> {
extends APIGuildChannel<T> {
/**
* The channel topic (0-4096 characters)
*/
topic?: string | null;
/**
* The id of the last thread created in this channel (may not point to an existing or valid thread)
*/
last_message_id?: Snowflake | null;
/**
* Amount of seconds a user has to wait before creating another thread (0-21600);
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
*
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
*/
rate_limit_per_user?: number;
/**
* When the last pinned message was pinned.
* This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
*/
last_pin_timestamp?: string | null;
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration;
/**
* The set of tags that can be used in a thread-only channel
*/
available_tags: APIGuildForumTag[];
/**
* The initial `rate_limit_per_user` to set on newly created threads.
* This field is copied to the thread at creation time and does not live update
*/
default_thread_rate_limit_per_user?: number;
/**
* The emoji to show in the add reaction button on a thread in a thread-only channel
*/

View File

@@ -48,10 +48,8 @@ export type TextChannelType =
| ChannelType.PrivateThread
| ChannelType.AnnouncementThread
| ChannelType.GuildText
| ChannelType.GuildForum
| ChannelType.GuildVoice
| ChannelType.GuildStageVoice
| ChannelType.GuildMedia;
| ChannelType.GuildStageVoice;
export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
@@ -112,7 +110,7 @@ export interface APIGuildChannel<T extends ChannelType> extends Omit<APIChannelB
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
export interface APIGuildTextChannel<T extends GuildTextChannelType>
export interface APIGuildTextChannel<T extends GuildTextChannelType | ChannelType.GuildForum | ChannelType.GuildMedia>
extends Omit<APITextBasedChannel<T>, 'name'>,
APIGuildChannel<T> {
/**
@@ -125,7 +123,7 @@ export interface APIGuildTextChannel<T extends GuildTextChannelType>
*/
default_thread_rate_limit_per_user?: number;
/**
* The channel topic (0-4096 characters for thread-only channels, 0-1024 characters for all others)
* The channel topic (0-1024 characters)
*/
topic?: string | null;
}
@@ -314,11 +312,40 @@ export enum ForumLayoutType {
}
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
extends APIGuildTextChannel<T> {
extends APIGuildChannel<T> {
/**
* The channel topic (0-4096 characters)
*/
topic?: string | null;
/**
* The id of the last thread created in this channel (may not point to an existing or valid thread)
*/
last_message_id?: Snowflake | null;
/**
* Amount of seconds a user has to wait before creating another thread (0-21600);
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
*
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
*/
rate_limit_per_user?: number;
/**
* When the last pinned message was pinned.
* This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
*/
last_pin_timestamp?: string | null;
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration;
/**
* The set of tags that can be used in a thread-only channel
*/
available_tags: APIGuildForumTag[];
/**
* The initial `rate_limit_per_user` to set on newly created threads.
* This field is copied to the thread at creation time and does not live update
*/
default_thread_rate_limit_per_user?: number;
/**
* The emoji to show in the add reaction button on a thread in a thread-only channel
*/

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "discord-api-types",
"version": "0.37.64",
"version": "0.37.65",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "discord-api-types",
"version": "0.37.64",
"version": "0.37.65",
"license": "MIT",
"devDependencies": {
"@babel/runtime-corejs3": "^7.18.0",

View File

@@ -1,6 +1,6 @@
{
"name": "discord-api-types",
"version": "0.37.64",
"version": "0.37.65",
"description": "Discord API typings that are kept up to date for use in bot library creation.",
"homepage": "https://discord-api-types.dev",
"exports": {

View File

@@ -48,10 +48,8 @@ export type TextChannelType =
| ChannelType.PrivateThread
| ChannelType.AnnouncementThread
| ChannelType.GuildText
| ChannelType.GuildForum
| ChannelType.GuildVoice
| ChannelType.GuildStageVoice
| ChannelType.GuildMedia;
| ChannelType.GuildStageVoice;
export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
@@ -112,7 +110,7 @@ export interface APIGuildChannel<T extends ChannelType> extends Omit<APIChannelB
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
export interface APIGuildTextChannel<T extends GuildTextChannelType>
export interface APIGuildTextChannel<T extends GuildTextChannelType | ChannelType.GuildForum | ChannelType.GuildMedia>
extends Omit<APITextBasedChannel<T>, 'name'>,
APIGuildChannel<T> {
/**
@@ -125,7 +123,7 @@ export interface APIGuildTextChannel<T extends GuildTextChannelType>
*/
default_thread_rate_limit_per_user?: number;
/**
* The channel topic (0-4096 characters for thread-only channels, 0-1024 characters for all others)
* The channel topic (0-1024 characters)
*/
topic?: string | null;
}
@@ -318,11 +316,40 @@ export enum ForumLayoutType {
}
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
extends APIGuildTextChannel<T> {
extends APIGuildChannel<T> {
/**
* The channel topic (0-4096 characters)
*/
topic?: string | null;
/**
* The id of the last thread created in this channel (may not point to an existing or valid thread)
*/
last_message_id?: Snowflake | null;
/**
* Amount of seconds a user has to wait before creating another thread (0-21600);
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
*
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
*/
rate_limit_per_user?: number;
/**
* When the last pinned message was pinned.
* This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
*/
last_pin_timestamp?: string | null;
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration;
/**
* The set of tags that can be used in a thread-only channel
*/
available_tags: APIGuildForumTag[];
/**
* The initial `rate_limit_per_user` to set on newly created threads.
* This field is copied to the thread at creation time and does not live update
*/
default_thread_rate_limit_per_user?: number;
/**
* The emoji to show in the add reaction button on a thread in a thread-only channel
*/

View File

@@ -48,10 +48,8 @@ export type TextChannelType =
| ChannelType.PrivateThread
| ChannelType.AnnouncementThread
| ChannelType.GuildText
| ChannelType.GuildForum
| ChannelType.GuildVoice
| ChannelType.GuildStageVoice
| ChannelType.GuildMedia;
| ChannelType.GuildStageVoice;
export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
@@ -112,7 +110,7 @@ export interface APIGuildChannel<T extends ChannelType> extends Omit<APIChannelB
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
export interface APIGuildTextChannel<T extends GuildTextChannelType>
export interface APIGuildTextChannel<T extends GuildTextChannelType | ChannelType.GuildForum | ChannelType.GuildMedia>
extends Omit<APITextBasedChannel<T>, 'name'>,
APIGuildChannel<T> {
/**
@@ -125,7 +123,7 @@ export interface APIGuildTextChannel<T extends GuildTextChannelType>
*/
default_thread_rate_limit_per_user?: number;
/**
* The channel topic (0-4096 characters for thread-only channels, 0-1024 characters for all others)
* The channel topic (0-1024 characters)
*/
topic?: string | null;
}
@@ -314,11 +312,40 @@ export enum ForumLayoutType {
}
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
extends APIGuildTextChannel<T> {
extends APIGuildChannel<T> {
/**
* The channel topic (0-4096 characters)
*/
topic?: string | null;
/**
* The id of the last thread created in this channel (may not point to an existing or valid thread)
*/
last_message_id?: Snowflake | null;
/**
* Amount of seconds a user has to wait before creating another thread (0-21600);
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
*
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
*/
rate_limit_per_user?: number;
/**
* When the last pinned message was pinned.
* This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
*/
last_pin_timestamp?: string | null;
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration;
/**
* The set of tags that can be used in a thread-only channel
*/
available_tags: APIGuildForumTag[];
/**
* The initial `rate_limit_per_user` to set on newly created threads.
* This field is copied to the thread at creation time and does not live update
*/
default_thread_rate_limit_per_user?: number;
/**
* The emoji to show in the add reaction button on a thread in a thread-only channel
*/

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
[{"entryPoints":{"globals":{"path":"globals.ts","label":"Global Types"},"gateway/common":{"path":"gateway/common.ts","label":"Gateway - Common Types"},"payloads/common":{"path":"payloads/common.ts","label":"Payloads - Common Types"},"rest/common":{"path":"rest/common.ts","label":"REST - Common Types"},"rpc/common":{"path":"rpc/common.ts","label":"RPC - Common Types"},"v6":{"path":"v6.ts","label":"API v6 - Deprecated"},"v8":{"path":"v8.ts","label":"API v8 - Deprecated"},"v9":{"path":"v9.ts","label":"API v9"},"v10":{"path":"v10.ts","label":"API v10"},"rpc/v8":{"path":"rpc/v8.ts","label":"RPC v8"},"rpc/v9":{"path":"rpc/v9.ts","label":"RPC v9"},"rpc/v10":{"path":"rpc/v10.ts","label":"RPC v10"},"voice/v4":{"path":"voice/v4.ts","label":"Voice v4"},"utils/v8":{"path":"utils/v8.ts","label":"Utils v8"},"utils/v9":{"path":"utils/v9.ts","label":"Utils v9"},"utils/v10":{"path":"utils/v10.ts","label":"Utils v10"}},"packagePath":"./","packageSlug":"discord-api-types","packageName":"discord-api-types","packageVersion":"0.37.63"}]
[{"entryPoints":{"globals":{"path":"globals.ts","label":"Global Types"},"gateway/common":{"path":"gateway/common.ts","label":"Gateway - Common Types"},"payloads/common":{"path":"payloads/common.ts","label":"Payloads - Common Types"},"rest/common":{"path":"rest/common.ts","label":"REST - Common Types"},"rpc/common":{"path":"rpc/common.ts","label":"RPC - Common Types"},"v6":{"path":"v6.ts","label":"API v6 - Deprecated"},"v8":{"path":"v8.ts","label":"API v8 - Deprecated"},"v9":{"path":"v9.ts","label":"API v9"},"v10":{"path":"v10.ts","label":"API v10"},"rpc/v8":{"path":"rpc/v8.ts","label":"RPC v8"},"rpc/v9":{"path":"rpc/v9.ts","label":"RPC v9"},"rpc/v10":{"path":"rpc/v10.ts","label":"RPC v10"},"voice/v4":{"path":"voice/v4.ts","label":"Voice v4"},"utils/v8":{"path":"utils/v8.ts","label":"Utils v8"},"utils/v9":{"path":"utils/v9.ts","label":"Utils v9"},"utils/v10":{"path":"utils/v10.ts","label":"Utils v10"}},"packagePath":"./","packageSlug":"discord-api-types","packageName":"discord-api-types","packageVersion":"0.37.65"}]

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
[
"0.37.64",
"0.37.63"
"0.37.65",
"0.37.64"
]