Add chat type documentation
parent
e6fdc8e02a
commit
b4d9865c2b
43
types.go
43
types.go
|
@ -104,17 +104,38 @@ type ChatPhoto struct {
|
||||||
|
|
||||||
// Chat contains information about the place a message was sent.
|
// Chat contains information about the place a message was sent.
|
||||||
type Chat struct {
|
type Chat struct {
|
||||||
ID int64 `json:"id"`
|
// ID is a unique identifier for this chat
|
||||||
Type string `json:"type"`
|
ID int64 `json:"id"`
|
||||||
Title string `json:"title"` // optional
|
// Type of chat, can be either “private”, “group”, “supergroup” or “channel”
|
||||||
UserName string `json:"username"` // optional
|
Type string `json:"type"`
|
||||||
FirstName string `json:"first_name"` // optional
|
// Title for supergroups, channels and group chats
|
||||||
LastName string `json:"last_name"` // optional
|
// optional
|
||||||
AllMembersAreAdmins bool `json:"all_members_are_administrators"` // optional
|
Title string `json:"title"`
|
||||||
Photo *ChatPhoto `json:"photo"`
|
// UserName for private chats, supergroups and channels if available
|
||||||
Description string `json:"description,omitempty"` // optional
|
// optional
|
||||||
InviteLink string `json:"invite_link,omitempty"` // optional
|
UserName string `json:"username"`
|
||||||
PinnedMessage *Message `json:"pinned_message"` // optional
|
// FirstName of the other party in a private chat
|
||||||
|
// optional
|
||||||
|
FirstName string `json:"first_name"`
|
||||||
|
// LastName of the other party in a private chat
|
||||||
|
// optional
|
||||||
|
LastName string `json:"last_name"`
|
||||||
|
// AllMembersAreAdmins
|
||||||
|
// optional
|
||||||
|
AllMembersAreAdmins bool `json:"all_members_are_administrators"`
|
||||||
|
// Photo is a chat photo
|
||||||
|
Photo *ChatPhoto `json:"photo"`
|
||||||
|
// Description for groups, supergroups and channel chats
|
||||||
|
// optional
|
||||||
|
Description string `json:"description,omitempty"`
|
||||||
|
// InviteLink is a chat invite link, for groups, supergroups and channel chats.
|
||||||
|
// Each administrator in a chat generates their own invite links,
|
||||||
|
// so the bot must first generate the link using exportChatInviteLink
|
||||||
|
// optional
|
||||||
|
InviteLink string `json:"invite_link,omitempty"`
|
||||||
|
// PinnedMessage Pinned message, for groups, supergroups and channels
|
||||||
|
// optional
|
||||||
|
PinnedMessage *Message `json:"pinned_message"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsPrivate returns if the Chat is a private conversation.
|
// IsPrivate returns if the Chat is a private conversation.
|
||||||
|
|
Loading…
Reference in New Issue