Skip to content

Commit

Permalink
fix getPollAnswerVoters return type (#3561)
Browse files Browse the repository at this point in the history
  • Loading branch information
kane50613 committed May 19, 2024
1 parent d0d810d commit d69e537
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/rest/src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import {
type DiscordMemberWithUser,
type DiscordMessage,
type DiscordPartialGuild,
type DiscordPollResult,
type DiscordGetAnswerVotesResponse,
type DiscordPrunedCount,
type DiscordRole,
type DiscordScheduledEvent,
Expand Down Expand Up @@ -1354,7 +1354,7 @@ export function createRestManager(options: CreateRestManagerOptions): RestManage
},

async getPollAnswerVoters(channelId, messageId, answerId, options) {
return await rest.get<DiscordPollResult>(rest.routes.channels.polls.votes(channelId, messageId, answerId, options))
return await rest.get<DiscordGetAnswerVotesResponse>(rest.routes.channels.polls.votes(channelId, messageId, answerId, options))
},

async endPoll(channelId, messageId) {
Expand Down
4 changes: 2 additions & 2 deletions packages/rest/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import type {
CamelizedDiscordMessage,
CamelizedDiscordModifyGuildWelcomeScreen,
CamelizedDiscordPartialGuild,
CamelizedDiscordPollResult,
CamelizedDiscordGetAnswerVotesResponse,
CamelizedDiscordPrunedCount,
CamelizedDiscordRole,
CamelizedDiscordScheduledEvent,
Expand Down Expand Up @@ -2560,7 +2560,7 @@ export interface RestManager {
messageId: BigString,
answerId: number,
options?: GetPollAnswerVotes,
) => Promise<CamelizedDiscordPollResult>
) => Promise<CamelizedDiscordGetAnswerVotesResponse>
/**
* Immediately ends the poll.
*
Expand Down

0 comments on commit d69e537

Please sign in to comment.