-
Notifications
You must be signed in to change notification settings - Fork 1
/
chat_member.go
37 lines (26 loc) · 1.19 KB
/
chat_member.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package telebot
import "fmt"
// ChatMemberUpdated represents changes in the status of a chat member.
type ChatMemberUpdated struct {
// Chat is the chat the user belongs to.
Chat Chat `json:"chat"`
// From is the performer of the action, which resulted in the change.
From User `json:"from"`
// Date is the date the change was done in Unix time.
Date int64 `json:"date"`
// OldChatMember is the previous information about the chat member.
OldChatMember ChatMember `json:"old_chat_member"`
// NewChatMember is the new information about the chat member.
NewChatMember ChatMember `json:"new_chat_member"`
// InviteLink is the chat invite link, which was used by the user to join the chat (optional, for joining by invite link events only).
InviteLink *ChatInviteLink `json:"invite_link,omitempty"`
// ViaChatFolderInviteLink is true if the user joined the chat via a chat folder invite link (optional).
ViaChatFolderInviteLink bool `json:"via_chat_folder_invite_link,omitempty"`
ViaJoinRequest bool `json:"via_join_request,omitempty"`
}
func (c *ChatMemberUpdated) ReflectType() string {
return fmt.Sprintf("%T", c)
}
func (c *ChatMemberUpdated) Type() string {
return "ChatMemberUpdated"
}