all repos — telegram-bot-api @ e6fdc8e02a7cb652a10914ae21dd73483c193ca1

Golang bindings for the Telegram Bot API

Add user type documentation
Ilya Kaznacheev ilya@kaznacheev.me
Sat, 24 Oct 2020 13:34:34 +0300
commit

e6fdc8e02a7cb652a10914ae21dd73483c193ca1

parent

b6df6c273aa804a6c7dd2f719ac8be1a95ce2790

1 files changed, 18 insertions(+), 7 deletions(-)

jump to
M types.gotypes.go

@@ -49,14 +49,25 @@ <-ch

} } -// User is a user on Telegram. +// User represents a Telegram user or bot. type User struct { - ID int `json:"id"` - FirstName string `json:"first_name"` - LastName string `json:"last_name"` // optional - UserName string `json:"username"` // optional - LanguageCode string `json:"language_code"` // optional - IsBot bool `json:"is_bot"` // optional + // ID is a unique identifier for this user or bot + ID int `json:"id"` + // FirstName user's or bot's first name + FirstName string `json:"first_name"` + // LastName user's or bot's last name + // optional + LastName string `json:"last_name"` + // UserName user's or bot's username + // optional + UserName string `json:"username"` + // LanguageCode IETF language tag of the user's language + // more info: https://en.wikipedia.org/wiki/IETF_language_tag + // optional + LanguageCode string `json:"language_code"` + // IsBot true, if this user is a bot + // optional + IsBot bool `json:"is_bot"` } // String displays a simple text version of a user.