This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
const.go
251 lines (234 loc) Β· 10.7 KB
/
const.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
package telegram
// Version represents current version of Telegram API supported by this package
const Version string = "5.3.0"
// Action represents available and supported status actions of bot
const (
ActionFindLocation string = "find_location"
ActionRecordVoice string = "record_voice"
ActionRecordVideo string = "record_video"
ActionRecordVideoNote string = "record_video_note"
ActionTyping string = "typing"
ActionUploadVoice string = "upload_voice"
ActionUploadDocument string = "upload_document"
ActionUploadPhoto string = "upload_photo"
ActionUploadVideo string = "upload_video"
ActionUploadVideoNote string = "upload_video_note"
)
// Chat represents available and supported chat types
const (
ChatChannel string = "channel"
ChatGroup string = "group"
ChatPrivate string = "private"
ChatSuperGroup string = "supergroup"
)
// Command represents global commands which should be supported by any bot. You can user IsCommandEqual method of
// Message for checking.
//
// See: https://core.telegram.org/bots#global-commands
const (
CommandHelp string = "help"
CommandSettings string = "settings"
CommandStart string = "start"
)
// Entity represents available and supported entity types
const (
EntityBold string = "bold"
EntityBotCommand string = "bot_command"
EntityCashtag string = "cashtag"
EntityCode string = "code"
EntityEmail string = "email"
EntityHashtag string = "hashtag"
EntityItalic string = "italic"
EntityMention string = "mention"
EntityPhoneNumber string = "phone_number"
EntityPre string = "pre"
EntityStrikethrough string = "strikethrough"
EntityTextLink string = "text_link"
EntityTextMention string = "text_mention"
EntityUnderline string = "underline"
EntityURL string = "url"
)
// Method represents available and supported Telegram API methods
const (
MethodAddStickerToSet string = "addStickerToSet"
MethodAnswerCallbackQuery string = "answerCallbackQuery"
MethodAnswerInlineQuery string = "answerInlineQuery"
MethodAnswerPreCheckoutQuery string = "answerPreCheckoutQuery"
MethodAnswerShippingQuery string = "answerShippingQuery"
MethodBanChatMember string = "banChatMember"
MethodClose string = "close"
MethodCopyMessage string = "copyMessage"
MethodCreateChatInviteLink string = "createChatInviteLink"
MethodCreateNewStickerSet string = "createNewStickerSet"
MethodDeleteChatPhoto string = "deleteChatPhoto"
MethodDeleteChatStickerSet string = "deleteChatStickerSet"
MethodDeleteMessage string = "deleteMessage"
MethodDeleteMyCommands string = "deleteMyCommands"
MethodDeleteStickerFromSet string = "deleteStickerFromSet"
MethodDeleteWebhook string = "deleteWebhook"
MethodEditChatInviteLink string = "editChatInviteLink"
MethodEditMessageCaption string = "editMessageCaption"
MethodEditMessageLiveLocation string = "editMessageLiveLocation"
MethodEditMessageMedia string = "editMessageMedia"
MethodEditMessageReplyMarkup string = "editMessageReplyMarkup"
MethodEditMessageText string = "editMessageText"
MethodExportChatInviteLink string = "exportChatInviteLink"
MethodForwardMessage string = "forwardMessage"
MethodGetChat string = "getChat"
MethodGetChatAdministrators string = "getChatAdministrators"
MethodGetChatMember string = "getChatMember"
MethodGetChatMemberCount string = "getChatMemberCount"
MethodGetFile string = "getFile"
MethodGetGameHighScores string = "getGameHighScores"
MethodGetMe string = "getMe"
MethodGetMyCommands string = "getMyCommands"
MethodGetStickerSet string = "getStickerSet"
MethodGetUpdates string = "getUpdates"
MethodGetUserProfilePhotos string = "getUserProfilePhotos"
MethodGetWebhookInfo string = "getWebhookInfo"
MethodLeaveChat string = "leaveChat"
MethodLogOut string = "logOut"
MethodPinChatMessage string = "pinChatMessage"
MethodPromoteChatMember string = "promoteChatMember"
MethodRestrictChatMember string = "restrictChatMember"
MethodRevokeChatInviteLink string = "revokeChatInviteLink"
MethodSendAnimation string = "sendAnimation"
MethodSendAudio string = "sendAudio"
MethodSendChatAction string = "sendChatAction"
MethodSendContact string = "sendContact"
MethodSendDice string = "sendDice"
MethodSendDocument string = "sendDocument"
MethodSendGame string = "sendGame"
MethodSendInvoice string = "sendInvoice"
MethodSendLocation string = "sendLocation"
MethodSendMediaGroup string = "sendMediaGroup"
MethodSendMessage string = "sendMessage"
MethodSendPhoto string = "sendPhoto"
MethodSendPoll string = "sendPoll"
MethodSendSticker string = "sendSticker"
MethodSendVenue string = "sendVenue"
MethodSendVideo string = "sendVideo"
MethodSendVideoNote string = "sendVideoNote"
MethodSendVoice string = "sendVoice"
MethodSetChatAdministratorCustomTitle string = "setChatAdministratorCustomTitle"
MethodSetChatDescription string = "setChatDescription"
MethodSetChatPermissions string = "setChatPermissions"
MethodSetChatPhoto string = "setChatPhoto"
MethodSetChatStickerSet string = "setChatStickerSet"
MethodSetChatTitle string = "setChatTitle"
MethodSetGameScore string = "setGameScore"
MethodSetMyCommands string = "setMyCommands"
MethodSetPassportDataErrors string = "setPassportDataErrors"
MethodSetStickerPositionInSet string = "setStickerPositionInSet"
MethodSetStickerSetThumb string = "setStickerSetThumb"
MethodSetWebhook string = "setWebhook"
MethodStopMessageLiveLocation string = "stopMessageLiveLocation"
MethodStopPoll string = "stopPoll"
MethodUnbanChatMember string = "unbanChatMember"
MethodUnpinAllChatMessages string = "unpinAllChatMessages"
MethodUnpinChatMessage string = "unpinChatMessage"
MethodUploadStickerFile string = "uploadStickerFile"
)
// Mode represents available and supported parsing modes of messages
const (
ParseModeHTML string = "HTML"
ParseModeMarkdown string = "Markdown"
ParseModeMarkdownV2 string = "MarkdownV2"
)
// Point represent a type of point on face
const (
PointForehead string = "forehead"
PointEyes string = "eyes"
PointMouth string = "mouth"
PointChin string = "chin"
)
// Mime represents available and supported MIME types of data
const (
MimeGIF string = "image/gif"
MimeHTML string = "text/html"
MimeJPEG string = "image/jpeg"
MimeMP4 string = "video/mp4"
MimePDF string = "application/pdf"
MimeZIP string = "application/zip"
)
// Scheme represents optional schemes for URLs
const (
SchemeAttach string = "attach"
SchemeTelegram string = "tg"
)
// Status represents available and supported statuses of ID
const (
StatusAdministrator string = "administrator"
StatusCreator string = "creator"
StatusKicked string = "kicked"
StatusLeft string = "left"
StatusMember string = "member"
StatusRestricted string = "restricted"
)
// Type represents available and supported types of data
const (
TypeAddress string = "address"
TypeArticle string = "article"
TypeAudio string = "audio"
TypeBankStatement string = "bank_statement"
TypeContact string = "contact"
TypeDocument string = "document"
TypeDriverLicense string = "driver_license"
TypeEmail string = "email"
TypeGame string = "game"
TypeGIF string = "gif"
TypeIdentityCard string = "identity_card"
TypeInternalPassport string = "internal_passport"
TypeLocation string = "location"
TypeMpeg4Gif string = "mpeg4_gif"
TypePassport string = "passport"
TypePassportRegistration string = "passport_registration"
TypePersonalDetails string = "personal_details"
TypePhoneNumber string = "phone_number"
TypePhoto string = "photo"
TypeRentalAgreement string = "rental_agreement"
TypeSticker string = "sticker"
TypeTemporaryRegistration string = "temporary_registration"
TypeUtilityBill string = "utility_bill"
TypeVenue string = "venue"
TypeVideo string = "video"
TypeVoice string = "voice"
)
// Update represents available and supported types of updates
const (
UpdateCallbackQuery string = "callback_query"
UpdateChannelPost string = "channel_post"
UpdateChosenInlineResult string = "chosen_inline_result"
UpdateEditedChannelPost string = "edited_channel_post"
UpdateEditedMessage string = "edited_message"
UpdateInlineQuery string = "inline_query"
UpdateMessage string = "message"
UpdatePoll string = "poll"
UpdatePreCheckoutQuery string = "pre_checkout_query"
UpdateShippingQuery string = "shipping_query"
)
// Default represents a default values for some helpers
const (
DefaultAudioSeparator string = " β "
DefaultAudioTitle string = "[untitled]"
)
// Poll represents a poll types
const (
PollQuiz string = "quiz"
PollRegular string = "regular"
)
// Emoji represents emoji supported by SendDice method
const (
EmojiBasketball string = "π" // 1-5
EmojiBowling string = "π³" // 1-6
EmojiDart string = "π―" // 1-6
EmojiGameDie string = "π²" // 1-6
EmojiSlotMachine string = "π°" // 1-64
EmojiSoccer string = "β½" // 1-5
)
const (
// FromAnonymous is a User ID for messages from anonymous group administrators.
FromAnonymous int64 = 1087968824 // @GroupAnonymousBot
// FromForwarder is a User ID for messages automatically forwarded to the discussion group.
FromForwarder int64 = 777000
)