From ae3572ed070819e26d69baab90196b202c4a9224 Mon Sep 17 00:00:00 2001 From: Fedor Lapshin Date: Tue, 7 May 2024 18:04:01 +0300 Subject: [PATCH] feat!: make answer id int --- endpoints.go | 4 ++-- restapi.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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