diff --git a/src/channel.ts b/src/channel.ts index ca9cffab3..f1370de81 100644 --- a/src/channel.ts +++ b/src/channel.ts @@ -55,6 +55,7 @@ import { QueryChannelAPIResponse, PollVoteData, SendMessageOptions, + AscDesc, } from './types'; import { Role } from './permissions'; @@ -823,10 +824,13 @@ export class Channel; user_id?: string }, + sort?: { created_at: AscDesc }[], ) { + const normalizedSort = sort ? normalizeQuerySort(sort) : undefined; const data = await this.getClient().get>( this.getClient().baseURL + `/messages/${parent_id}/replies`, { + sort: normalizedSort, ...options, }, );