fix(types)!: Remove incorrect, reorder and fixes in channel (#4151)

* Remove incorrect, reorder and fixes in channel

- Updated comments to be more clear
- Remove `Channel.newly_created`, doesn't seem to exist in the api docs
- Fix nullability for some fields
- Remove DiscordActiveThreads, DiscordArchivedThreads and DiscordListActiveThreads as they don't seem to match anything in the api

* Add back DiscordListActiveThreads but under Guild
and fix type errors

* Update packages/types/src/discord/channel.ts

Co-authored-by: LTS (Link) <lts20050703@gmail.com>

* Revert newly_created removal

* Apply suggestions from code review

Co-authored-by: LTS (Link) <lts20050703@gmail.com>

---------

Co-authored-by: LTS (Link) <lts20050703@gmail.com>
This commit is contained in:
Fleny
2025-04-26 08:31:01 +02:00
committed by GitHub
co-authored by LTS
parent f0e0bd0aef
commit 24703f13dd
4 changed files with 132 additions and 68 deletions
+4 -4
View File
@@ -35,7 +35,6 @@ import type {
DiscordApplicationCommandPermissions,
DiscordApplicationRoleConnection,
DiscordApplicationRoleConnectionMetadata,
DiscordArchivedThreads,
DiscordAuditLog,
DiscordBan,
DiscordConnection,
@@ -46,6 +45,7 @@ import type {
DiscordGuildWidgetSettings,
DiscordInvite,
DiscordInviteMetadata,
DiscordListArchivedThreads,
DiscordMessage,
DiscordModifyGuildWelcomeScreen,
DiscordPrunedCount,
@@ -1018,10 +1018,10 @@ export type BotHelpers<TProps extends TransformersDesiredProperties, TBehavior e
getStickerPacks: () => Promise<StickerPack[]>
getOriginalInteractionResponse: (token: string) => Promise<SetupDesiredProps<Message, TProps, TBehavior>>
getPinnedMessages: (channelId: BigString) => Promise<SetupDesiredProps<Message, TProps, TBehavior>[]>
getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordArchivedThreads>>
getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordArchivedThreads>>
getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordListArchivedThreads>>
getPrivateJoinedArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordListArchivedThreads>>
getPruneCount: (guildId: BigString, options?: GetGuildPruneCountQuery) => Promise<Camelize<DiscordPrunedCount>>
getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordArchivedThreads>>
getPublicArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordListArchivedThreads>>
getRoles: (guildId: BigString) => Promise<SetupDesiredProps<Role, TProps, TBehavior>[]>
getRole: (guildId: BigString, roleId: BigString) => Promise<SetupDesiredProps<Role, TProps, TBehavior>>
getScheduledEvent: (