NicoNex / echotron

An elegant and concurrent library for the Telegram bot API in Go.
https://t.me/s/echotronnews
GNU Lesser General Public License v3.0
372 stars 26 forks source link

Update Telegram Bot API 5.4 #17

Closed DazFather closed 3 years ago

DazFather commented 3 years ago

You might want to change ChatInviteLinkOption since member_limit and creates_join_request cannot be specified together https://core.telegram.org/bots/api#createchatinvitelink

DjMike238 commented 3 years ago

You might want to change ChatInviteLinkOption since member_limit and creates_join_request cannot be specified

I don't think there's any need to do that, since those are both optional parameters for both CreateChatInviteLink and EditChatInviteLink. In any case, if any of those two parameters are empty, they will be ignored and won't be included in the final request, since default values are checked in querybuilder.go (notice the use of the IsZero() method). Worst case scenario, an user who tries to use both parameters will get an error from the API as a response.

Also, the new approveChatJoinRequest and declineChatJoinRequest methods aren't included in this PR, but I can take it from here.

Merging now.