diff options
Diffstat (limited to 'chats.go')
-rw-r--r-- | chats.go | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -20,7 +20,7 @@ func newChats(client *client) *chats { } //GetChats returns information about chats that bot participated in: a result list and marker points to the next page -func (a *chats) GetChats(count, marker int) (*schemes.ChatList, error) { +func (a *chats) GetChats(count, marker int64) (*schemes.ChatList, error) { result := new(schemes.ChatList) values := url.Values{} if count > 0 { @@ -42,7 +42,7 @@ func (a *chats) GetChats(count, marker int) (*schemes.ChatList, error) { } //GetChat returns info about chat -func (a *chats) GetChat(chatID int) (*schemes.Chat, error) { +func (a *chats) GetChat(chatID int64) (*schemes.Chat, error) { result := new(schemes.Chat) values := url.Values{} body, err := a.client.request(http.MethodGet, fmt.Sprintf("chats/%d", chatID), values, nil) @@ -58,7 +58,7 @@ func (a *chats) GetChat(chatID int) (*schemes.Chat, error) { } //GetChatMembership returns chat membership info for current bot -func (a *chats) GetChatMembership(chatID int) (*schemes.ChatMember, error) { +func (a *chats) GetChatMembership(chatID int64) (*schemes.ChatMember, error) { result := new(schemes.ChatMember) values := url.Values{} body, err := a.client.request(http.MethodGet, fmt.Sprintf("chats/%d/members/me", chatID), values, nil) @@ -74,7 +74,7 @@ func (a *chats) GetChatMembership(chatID int) (*schemes.ChatMember, error) { } //GetChatMembers returns users participated in chat -func (a *chats) GetChatMembers(chatID, count, marker int) (*schemes.ChatMembersList, error) { +func (a *chats) GetChatMembers(chatID, count, marker int64) (*schemes.ChatMembersList, error) { result := new(schemes.ChatMembersList) values := url.Values{} if count > 0 { @@ -96,7 +96,7 @@ func (a *chats) GetChatMembers(chatID, count, marker int) (*schemes.ChatMembersL } //LeaveChat removes bot from chat members -func (a *chats) LeaveChat(chatID int) (*schemes.SimpleQueryResult, error) { +func (a *chats) LeaveChat(chatID int64) (*schemes.SimpleQueryResult, error) { result := new(schemes.SimpleQueryResult) values := url.Values{} body, err := a.client.request(http.MethodDelete, fmt.Sprintf("chats/%d/members/me", chatID), values, nil) @@ -112,7 +112,7 @@ func (a *chats) LeaveChat(chatID int) (*schemes.SimpleQueryResult, error) { } //EditChat edits chat info: title, icon, etc… -func (a *chats) EditChat(chatID int, update *schemes.ChatPatch) (*schemes.Chat, error) { +func (a *chats) EditChat(chatID int64, update *schemes.ChatPatch) (*schemes.Chat, error) { result := new(schemes.Chat) values := url.Values{} body, err := a.client.request(http.MethodPatch, fmt.Sprintf("chats/%d", chatID), values, update) @@ -128,7 +128,7 @@ func (a *chats) EditChat(chatID int, update *schemes.ChatPatch) (*schemes.Chat, } //AddMember adds members to chat. Additional permissions may require. -func (a *chats) AddMember(chatID int, users schemes.UserIdsList) (*schemes.SimpleQueryResult, error) { +func (a *chats) AddMember(chatID int64, users schemes.UserIdsList) (*schemes.SimpleQueryResult, error) { result := new(schemes.SimpleQueryResult) values := url.Values{} body, err := a.client.request(http.MethodPost, fmt.Sprintf("chats/%d/members", chatID), values, users) @@ -144,7 +144,7 @@ func (a *chats) AddMember(chatID int, users schemes.UserIdsList) (*schemes.Simpl } //RemoveMember removes member from chat. Additional permissions may require. -func (a *chats) RemoveMember(chatID int, userID int) (*schemes.SimpleQueryResult, error) { +func (a *chats) RemoveMember(chatID int64, userID int64) (*schemes.SimpleQueryResult, error) { result := new(schemes.SimpleQueryResult) values := url.Values{} values.Set("user_id", strconv.Itoa(int(userID))) @@ -161,7 +161,7 @@ func (a *chats) RemoveMember(chatID int, userID int) (*schemes.SimpleQueryResult } //SendAction send bot action to chat -func (a *chats) SendAction(chatID int, action schemes.SenderAction) (*schemes.SimpleQueryResult, error) { +func (a *chats) SendAction(chatID int64, action schemes.SenderAction) (*schemes.SimpleQueryResult, error) { result := new(schemes.SimpleQueryResult) values := url.Values{} body, err := a.client.request(http.MethodPost, fmt.Sprintf("chats/%d/actions", chatID), values, schemes.ActionRequestBody{Action: action}) |