-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathuser.go
More file actions
40 lines (30 loc) · 1.33 KB
/
user.go
File metadata and controls
40 lines (30 loc) · 1.33 KB
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
38
39
40
package initdata
// User describes user information:
// https://docs.telegram-mini-apps.com/platform/init-data#user
type User struct {
// Optional. True, if this user added the bot to the attachment menu.
AddedToAttachmentMenu bool `json:"added_to_attachment_menu,omitempty"`
// Optional. True, if this user allowed the bot to message them.
AllowsWriteToPm bool `json:"allows_write_to_pm,omitempty"`
// First name of the user or bot.
FirstName string `json:"first_name"`
// A unique identifier for the user or bot.
ID int64 `json:"id"`
// Optional. True, if this user is a bot. Returned in the `receiver` field
// only.
IsBot bool `json:"is_bot,omitempty"`
// Optional. True, if this user is a Telegram Premium user.
IsPremium bool `json:"is_premium,omitempty"`
// Optional. Last name of the user or bot.
LastName string `json:"last_name,omitempty"`
// Optional. Username of the user or bot.
Username string `json:"username,omitempty"`
// Optional. IETF language tag of the user's language. Returns in user
// field only.
// https://en.wikipedia.org/wiki/IETF_language_tag
LanguageCode string `json:"language_code,omitempty"`
// Optional. URL of the user’s profile photo. The photo can be in .jpeg or
// .svg formats. Only returned for Web Apps launched from the
// attachment menu.
PhotoURL string `json:"photo_url,omitempty"`
}