diff --git a/rest/channels.go b/rest/channels.go index 477d0107..83094eec 100644 --- a/rest/channels.go +++ b/rest/channels.go @@ -232,7 +232,11 @@ func (s *channelImpl) GetPollAnswerVotes(channelID snowflake.ID, messageID snowf if limit != 0 { values["limit"] = limit } - err = s.client.Do(GetPollAnswerVotes.Compile(values, channelID, messageID, answerID), nil, &users, opts...) + var rs pollAnswerVotesResponse + err = s.client.Do(GetPollAnswerVotes.Compile(values, channelID, messageID, answerID), nil, &rs, opts...) + if err == nil { + users = rs.Users + } return } @@ -249,3 +253,7 @@ func (s *channelImpl) ExpirePoll(channelID snowflake.ID, messageID snowflake.ID, err = s.client.Do(ExpirePoll.Compile(nil, channelID, messageID), nil, &message, opts...) return } + +type pollAnswerVotesResponse struct { + Users []discord.User `json:"users"` +}