fix(types,bot)!: GetChannelPins.items is an array (#4284)

This commit is contained in:
Fleny
2025-08-03 17:22:12 -07:00
committed by GitHub
parent 251ad5ce51
commit 278099ae30
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -442,7 +442,7 @@ export function createBotHelpers<TProps extends TransformersDesiredProperties, T
return {
hasMore: res.has_more,
items: bot.transformers.messagePin(bot, res.items),
items: res.items.map((item) => bot.transformers.messagePin(bot, item)),
}
},
getPinnedMessages: async (channelId) => {
@@ -1003,7 +1003,7 @@ export type BotHelpers<TProps extends TransformersDesiredProperties, TBehavior e
getChannelPins: (
channelId: BigString,
options?: GetChannelPinsOptions,
) => Promise<{ items: SetupDesiredProps<MessagePin, TProps, TBehavior>; hasMore: boolean }>
) => Promise<{ items: SetupDesiredProps<MessagePin, TProps, TBehavior>[]; hasMore: boolean }>
/** @deprecated Use {@link BotHelpers.getChannelPins} instead */
getPinnedMessages: (channelId: BigString) => Promise<SetupDesiredProps<Message, TProps, TBehavior>[]>
getPrivateArchivedThreads: (channelId: BigString, options?: ListArchivedThreads) => Promise<Camelize<DiscordListArchivedThreads>>