diff --git a/endpoints.go b/endpoints.go index 66ef010d9..29189af69 100644 --- a/endpoints.go +++ b/endpoints.go @@ -165,8 +165,8 @@ var ( EndpointPoll = func(cID, mID string) string { return EndpointChannel(cID) + "/polls/" + mID } - EndpointPollAnswerVoters = func(cID, mID, aID string) string { - return EndpointPoll(cID, mID) + "/answers/" + aID + EndpointPollAnswerVoters = func(cID, mID string, aID int) string { + return EndpointPoll(cID, mID) + "/answers/" + strconv.Itoa(aID) } EndpointPollExpire = func(cID, mID string) string { return EndpointPoll(cID, mID) + "/expire" diff --git a/restapi.go b/restapi.go index 6de3dc3ac..cc9e3649b 100644 --- a/restapi.go +++ b/restapi.go @@ -3462,7 +3462,7 @@ func (s *Session) UserApplicationRoleConnectionUpdate(appID string, rconn *Appli // channelID : ID of the channel. // messageID : ID of the message. // answerID : ID of the answer. -func (s *Session) PollAnswerVoters(channelID, messageID, answerID string) (voters []*User, err error) { +func (s *Session) PollAnswerVoters(channelID, messageID string, answerID int) (voters []*User, err error) { endpoint := EndpointPollAnswerVoters(channelID, messageID, answerID) var body []byte