-
-
Notifications
You must be signed in to change notification settings - Fork 134
/
options.gen.go
397 lines (354 loc) · 10.3 KB
/
options.gen.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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
// Code generated by mkentity, DO NOT EDIT.
package entity
import (
"context"
"github.com/gotd/td/tg"
)
var (
_ = tg.Invoker(nil)
_ = context.Context(nil)
)
// Unknown creates Formatter of Unknown message entity.
//
// See https://core.telegram.org/constructor/messageEntityUnknown.
func Unknown() Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityUnknown{
Offset: offset,
Length: length,
}
}
}
// Unknown adds and formats message as Unknown message entity.
//
// See https://core.telegram.org/constructor/messageEntityUnknown.
func (b *Builder) Unknown(s string) *Builder {
return b.Format(s, Unknown())
}
// Mention creates Formatter of Mention message entity.
//
// See https://core.telegram.org/constructor/messageEntityMention.
func Mention() Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityMention{
Offset: offset,
Length: length,
}
}
}
// Mention adds and formats message as Mention message entity.
//
// See https://core.telegram.org/constructor/messageEntityMention.
func (b *Builder) Mention(s string) *Builder {
return b.Format(s, Mention())
}
// Hashtag creates Formatter of Hashtag message entity.
//
// See https://core.telegram.org/constructor/messageEntityHashtag.
func Hashtag() Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityHashtag{
Offset: offset,
Length: length,
}
}
}
// Hashtag adds and formats message as Hashtag message entity.
//
// See https://core.telegram.org/constructor/messageEntityHashtag.
func (b *Builder) Hashtag(s string) *Builder {
return b.Format(s, Hashtag())
}
// BotCommand creates Formatter of BotCommand message entity.
//
// See https://core.telegram.org/constructor/messageEntityBotCommand.
func BotCommand() Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityBotCommand{
Offset: offset,
Length: length,
}
}
}
// BotCommand adds and formats message as BotCommand message entity.
//
// See https://core.telegram.org/constructor/messageEntityBotCommand.
func (b *Builder) BotCommand(s string) *Builder {
return b.Format(s, BotCommand())
}
// URL creates Formatter of URL message entity.
//
// See https://core.telegram.org/constructor/messageEntityUrl.
func URL() Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityURL{
Offset: offset,
Length: length,
}
}
}
// URL adds and formats message as URL message entity.
//
// See https://core.telegram.org/constructor/messageEntityUrl.
func (b *Builder) URL(s string) *Builder {
return b.Format(s, URL())
}
// Email creates Formatter of Email message entity.
//
// See https://core.telegram.org/constructor/messageEntityEmail.
func Email() Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityEmail{
Offset: offset,
Length: length,
}
}
}
// Email adds and formats message as Email message entity.
//
// See https://core.telegram.org/constructor/messageEntityEmail.
func (b *Builder) Email(s string) *Builder {
return b.Format(s, Email())
}
// Bold creates Formatter of Bold message entity.
//
// See https://core.telegram.org/constructor/messageEntityBold.
func Bold() Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityBold{
Offset: offset,
Length: length,
}
}
}
// Bold adds and formats message as Bold message entity.
//
// See https://core.telegram.org/constructor/messageEntityBold.
func (b *Builder) Bold(s string) *Builder {
return b.Format(s, Bold())
}
// Italic creates Formatter of Italic message entity.
//
// See https://core.telegram.org/constructor/messageEntityItalic.
func Italic() Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityItalic{
Offset: offset,
Length: length,
}
}
}
// Italic adds and formats message as Italic message entity.
//
// See https://core.telegram.org/constructor/messageEntityItalic.
func (b *Builder) Italic(s string) *Builder {
return b.Format(s, Italic())
}
// Code creates Formatter of Code message entity.
//
// See https://core.telegram.org/constructor/messageEntityCode.
func Code() Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityCode{
Offset: offset,
Length: length,
}
}
}
// Code adds and formats message as Code message entity.
//
// See https://core.telegram.org/constructor/messageEntityCode.
func (b *Builder) Code(s string) *Builder {
return b.Format(s, Code())
}
// Pre creates Formatter of Pre message entity.
//
// See https://core.telegram.org/constructor/messageEntityPre.
func Pre(language string) Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityPre{
Offset: offset,
Length: length,
Language: language,
}
}
}
// Pre adds and formats message as Pre message entity.
//
// See https://core.telegram.org/constructor/messageEntityPre.
func (b *Builder) Pre(s string, language string) *Builder {
return b.Format(s, Pre(language))
}
// TextURL creates Formatter of TextURL message entity.
//
// See https://core.telegram.org/constructor/messageEntityTextUrl.
func TextURL(uRL string) Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityTextURL{
Offset: offset,
Length: length,
URL: uRL,
}
}
}
// TextURL adds and formats message as TextURL message entity.
//
// See https://core.telegram.org/constructor/messageEntityTextUrl.
func (b *Builder) TextURL(s string, uRL string) *Builder {
return b.Format(s, TextURL(uRL))
}
// MentionName creates Formatter of MentionName message entity.
//
// See https://core.telegram.org/constructor/inputMessageEntityMentionName.
func MentionName(userID tg.InputUserClass) Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.InputMessageEntityMentionName{
Offset: offset,
Length: length,
UserID: userID,
}
}
}
// MentionName adds and formats message as MentionName message entity.
//
// See https://core.telegram.org/constructor/inputMessageEntityMentionName.
func (b *Builder) MentionName(s string, userID tg.InputUserClass) *Builder {
return b.Format(s, MentionName(userID))
}
// Phone creates Formatter of Phone message entity.
//
// See https://core.telegram.org/constructor/messageEntityPhone.
func Phone() Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityPhone{
Offset: offset,
Length: length,
}
}
}
// Phone adds and formats message as Phone message entity.
//
// See https://core.telegram.org/constructor/messageEntityPhone.
func (b *Builder) Phone(s string) *Builder {
return b.Format(s, Phone())
}
// Cashtag creates Formatter of Cashtag message entity.
//
// See https://core.telegram.org/constructor/messageEntityCashtag.
func Cashtag() Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityCashtag{
Offset: offset,
Length: length,
}
}
}
// Cashtag adds and formats message as Cashtag message entity.
//
// See https://core.telegram.org/constructor/messageEntityCashtag.
func (b *Builder) Cashtag(s string) *Builder {
return b.Format(s, Cashtag())
}
// Underline creates Formatter of Underline message entity.
//
// See https://core.telegram.org/constructor/messageEntityUnderline.
func Underline() Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityUnderline{
Offset: offset,
Length: length,
}
}
}
// Underline adds and formats message as Underline message entity.
//
// See https://core.telegram.org/constructor/messageEntityUnderline.
func (b *Builder) Underline(s string) *Builder {
return b.Format(s, Underline())
}
// Strike creates Formatter of Strike message entity.
//
// See https://core.telegram.org/constructor/messageEntityStrike.
func Strike() Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityStrike{
Offset: offset,
Length: length,
}
}
}
// Strike adds and formats message as Strike message entity.
//
// See https://core.telegram.org/constructor/messageEntityStrike.
func (b *Builder) Strike(s string) *Builder {
return b.Format(s, Strike())
}
// BankCard creates Formatter of BankCard message entity.
//
// See https://core.telegram.org/constructor/messageEntityBankCard.
func BankCard() Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityBankCard{
Offset: offset,
Length: length,
}
}
}
// BankCard adds and formats message as BankCard message entity.
//
// See https://core.telegram.org/constructor/messageEntityBankCard.
func (b *Builder) BankCard(s string) *Builder {
return b.Format(s, BankCard())
}
// Spoiler creates Formatter of Spoiler message entity.
//
// See https://core.telegram.org/constructor/messageEntitySpoiler.
func Spoiler() Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntitySpoiler{
Offset: offset,
Length: length,
}
}
}
// Spoiler adds and formats message as Spoiler message entity.
//
// See https://core.telegram.org/constructor/messageEntitySpoiler.
func (b *Builder) Spoiler(s string) *Builder {
return b.Format(s, Spoiler())
}
// CustomEmoji creates Formatter of CustomEmoji message entity.
//
// See https://core.telegram.org/constructor/messageEntityCustomEmoji.
func CustomEmoji(documentID int64) Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityCustomEmoji{
Offset: offset,
Length: length,
DocumentID: documentID,
}
}
}
// CustomEmoji adds and formats message as CustomEmoji message entity.
//
// See https://core.telegram.org/constructor/messageEntityCustomEmoji.
func (b *Builder) CustomEmoji(s string, documentID int64) *Builder {
return b.Format(s, CustomEmoji(documentID))
}
// Blockquote creates Formatter of Blockquote message entity.
//
// See https://core.telegram.org/constructor/messageEntityBlockquote.
func Blockquote() Formatter {
return func(offset, length int) tg.MessageEntityClass {
return &tg.MessageEntityBlockquote{
Offset: offset,
Length: length,
}
}
}
// Blockquote adds and formats message as Blockquote message entity.
//
// See https://core.telegram.org/constructor/messageEntityBlockquote.
func (b *Builder) Blockquote(s string) *Builder {
return b.Format(s, Blockquote())
}