-
Notifications
You must be signed in to change notification settings - Fork 58
Add support for handling 'chat_member' update type #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed usage of fmt.Frpintf without substitution parameters.
| CanSetStickerSet bool | ||
| } | ||
|
|
||
| type ChatInviteLink struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New struct required for ChatMemberUpdated
|
|
||
| // ChatMemberUpdated represents an update | ||
| // about chat member's status change in a chat. | ||
| type ChatMemberUpdated struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New update, fields are from https://core.telegram.org/bots/api#chatmemberupdated
| s.callbackHandler = generalCallbackHandler | ||
| } | ||
|
|
||
| // HandleChatMember set handler for chat member updates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate handler setting function for new type of updates
Hi, thank you for creating and maintaining
tbot— it's been really helpful in my Telegram bot development!This PR adds support for the
chat_memberupdate type.These updates are important for bots that need to respond to user join/leave events, especially in group or supergroup contexts.