-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
types_setters.go
2074 lines (1735 loc) · 61 KB
/
types_setters.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
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package telego
// WithMessageID adds message ID parameter
func (r *ReplyParameters) WithMessageID(messageID int) *ReplyParameters {
r.MessageID = messageID
return r
}
// WithChatID adds chat ID parameter
func (r *ReplyParameters) WithChatID(chatID ChatID) *ReplyParameters {
r.ChatID = chatID
return r
}
// WithAllowSendingWithoutReply adds allow sending without reply parameter
func (r *ReplyParameters) WithAllowSendingWithoutReply() *ReplyParameters {
r.AllowSendingWithoutReply = true
return r
}
// WithQuote adds quote parameter
func (r *ReplyParameters) WithQuote(quote string) *ReplyParameters {
r.Quote = quote
return r
}
// WithQuoteParseMode adds quote parse mode parameter
func (r *ReplyParameters) WithQuoteParseMode(quoteParseMode string) *ReplyParameters {
r.QuoteParseMode = quoteParseMode
return r
}
// WithQuoteEntities adds quote entities parameter
func (r *ReplyParameters) WithQuoteEntities(quoteEntities ...MessageEntity) *ReplyParameters {
r.QuoteEntities = quoteEntities
return r
}
// WithQuotePosition adds quote position parameter
func (r *ReplyParameters) WithQuotePosition(quotePosition int) *ReplyParameters {
r.QuotePosition = quotePosition
return r
}
// WithText adds text parameter
func (i *InputPollOption) WithText(text string) *InputPollOption {
i.Text = text
return i
}
// WithTextParseMode adds text parse mode parameter
func (i *InputPollOption) WithTextParseMode(textParseMode string) *InputPollOption {
i.TextParseMode = textParseMode
return i
}
// WithTextEntities adds text entities parameter
func (i *InputPollOption) WithTextEntities(textEntities ...MessageEntity) *InputPollOption {
i.TextEntities = textEntities
return i
}
// WithKeyboard adds keyboard parameter
func (r *ReplyKeyboardMarkup) WithKeyboard(keyboard ...[]KeyboardButton) *ReplyKeyboardMarkup {
r.Keyboard = keyboard
return r
}
// WithIsPersistent adds is persistent parameter
func (r *ReplyKeyboardMarkup) WithIsPersistent() *ReplyKeyboardMarkup {
r.IsPersistent = true
return r
}
// WithResizeKeyboard adds resize keyboard parameter
func (r *ReplyKeyboardMarkup) WithResizeKeyboard() *ReplyKeyboardMarkup {
r.ResizeKeyboard = true
return r
}
// WithOneTimeKeyboard adds one time keyboard parameter
func (r *ReplyKeyboardMarkup) WithOneTimeKeyboard() *ReplyKeyboardMarkup {
r.OneTimeKeyboard = true
return r
}
// WithInputFieldPlaceholder adds input field placeholder parameter
func (r *ReplyKeyboardMarkup) WithInputFieldPlaceholder(inputFieldPlaceholder string) *ReplyKeyboardMarkup {
r.InputFieldPlaceholder = inputFieldPlaceholder
return r
}
// WithSelective adds selective parameter
func (r *ReplyKeyboardMarkup) WithSelective() *ReplyKeyboardMarkup {
r.Selective = true
return r
}
// WithText adds text parameter
func (k KeyboardButton) WithText(text string) KeyboardButton {
k.Text = text
return k
}
// WithRequestUsers adds request users parameter
func (k KeyboardButton) WithRequestUsers(requestUsers *KeyboardButtonRequestUsers) KeyboardButton {
k.RequestUsers = requestUsers
return k
}
// WithRequestChat adds request chat parameter
func (k KeyboardButton) WithRequestChat(requestChat *KeyboardButtonRequestChat) KeyboardButton {
k.RequestChat = requestChat
return k
}
// WithRequestContact adds request contact parameter
func (k KeyboardButton) WithRequestContact() KeyboardButton {
k.RequestContact = true
return k
}
// WithRequestLocation adds request location parameter
func (k KeyboardButton) WithRequestLocation() KeyboardButton {
k.RequestLocation = true
return k
}
// WithRequestPoll adds request poll parameter
func (k KeyboardButton) WithRequestPoll(requestPoll *KeyboardButtonPollType) KeyboardButton {
k.RequestPoll = requestPoll
return k
}
// WithWebApp adds web app parameter
func (k KeyboardButton) WithWebApp(webApp *WebAppInfo) KeyboardButton {
k.WebApp = webApp
return k
}
// WithUserIsBot adds user is bot parameter
func (k *KeyboardButtonRequestUsers) WithUserIsBot(userIsBot bool) *KeyboardButtonRequestUsers {
k.UserIsBot = ToPtr(userIsBot)
return k
}
// WithUserIsPremium adds user is premium parameter
func (k *KeyboardButtonRequestUsers) WithUserIsPremium(userIsPremium bool) *KeyboardButtonRequestUsers {
k.UserIsPremium = ToPtr(userIsPremium)
return k
}
// WithMaxQuantity adds max quantity parameter
func (k *KeyboardButtonRequestUsers) WithMaxQuantity(maxQuantity int) *KeyboardButtonRequestUsers {
k.MaxQuantity = maxQuantity
return k
}
// WithRequestName adds request name parameter
func (k *KeyboardButtonRequestUsers) WithRequestName(requestName bool) *KeyboardButtonRequestUsers {
k.RequestName = ToPtr(requestName)
return k
}
// WithRequestUsername adds request username parameter
func (k *KeyboardButtonRequestUsers) WithRequestUsername(requestUsername bool) *KeyboardButtonRequestUsers {
k.RequestUsername = ToPtr(requestUsername)
return k
}
// WithRequestPhoto adds request photo parameter
func (k *KeyboardButtonRequestUsers) WithRequestPhoto(requestPhoto bool) *KeyboardButtonRequestUsers {
k.RequestPhoto = ToPtr(requestPhoto)
return k
}
// WithChatIsChannel adds chat is channel parameter
func (k *KeyboardButtonRequestChat) WithChatIsChannel() *KeyboardButtonRequestChat {
k.ChatIsChannel = true
return k
}
// WithChatIsForum adds chat is forum parameter
func (k *KeyboardButtonRequestChat) WithChatIsForum(chatIsForum bool) *KeyboardButtonRequestChat {
k.ChatIsForum = ToPtr(chatIsForum)
return k
}
// WithChatHasUsername adds chat has username parameter
func (k *KeyboardButtonRequestChat) WithChatHasUsername(chatHasUsername bool) *KeyboardButtonRequestChat {
k.ChatHasUsername = ToPtr(chatHasUsername)
return k
}
// WithChatIsCreated adds chat is created parameter
func (k *KeyboardButtonRequestChat) WithChatIsCreated(chatIsCreated bool) *KeyboardButtonRequestChat {
k.ChatIsCreated = ToPtr(chatIsCreated)
return k
}
// WithUserAdministratorRights adds user administrator rights parameter
func (k *KeyboardButtonRequestChat) WithUserAdministratorRights(userAdministratorRights *ChatAdministratorRights,
) *KeyboardButtonRequestChat {
k.UserAdministratorRights = userAdministratorRights
return k
}
// WithBotAdministratorRights adds bot administrator rights parameter
func (k *KeyboardButtonRequestChat) WithBotAdministratorRights(botAdministratorRights *ChatAdministratorRights,
) *KeyboardButtonRequestChat {
k.BotAdministratorRights = botAdministratorRights
return k
}
// WithBotIsMember adds bot is member parameter
func (k *KeyboardButtonRequestChat) WithBotIsMember(botIsMember bool) *KeyboardButtonRequestChat {
k.BotIsMember = ToPtr(botIsMember)
return k
}
// WithRequestTitle adds request title parameter
func (k *KeyboardButtonRequestChat) WithRequestTitle(requestTitle bool) *KeyboardButtonRequestChat {
k.RequestTitle = ToPtr(requestTitle)
return k
}
// WithRequestUsername adds request username parameter
func (k *KeyboardButtonRequestChat) WithRequestUsername(requestUsername bool) *KeyboardButtonRequestChat {
k.RequestUsername = ToPtr(requestUsername)
return k
}
// WithRequestPhoto adds request photo parameter
func (k *KeyboardButtonRequestChat) WithRequestPhoto(requestPhoto bool) *KeyboardButtonRequestChat {
k.RequestPhoto = ToPtr(requestPhoto)
return k
}
// WithRemoveKeyboard adds remove keyboard parameter
func (r *ReplyKeyboardRemove) WithRemoveKeyboard() *ReplyKeyboardRemove {
r.RemoveKeyboard = true
return r
}
// WithSelective adds selective parameter
func (r *ReplyKeyboardRemove) WithSelective() *ReplyKeyboardRemove {
r.Selective = true
return r
}
// WithInlineKeyboard adds inline keyboard parameter
func (i *InlineKeyboardMarkup) WithInlineKeyboard(inlineKeyboard ...[]InlineKeyboardButton) *InlineKeyboardMarkup {
i.InlineKeyboard = inlineKeyboard
return i
}
// WithText adds text parameter
func (i InlineKeyboardButton) WithText(text string) InlineKeyboardButton {
i.Text = text
return i
}
// WithURL adds URL parameter
func (i InlineKeyboardButton) WithURL(url string) InlineKeyboardButton {
i.URL = url
return i
}
// WithCallbackData adds callback data parameter
func (i InlineKeyboardButton) WithCallbackData(callbackData string) InlineKeyboardButton {
i.CallbackData = callbackData
return i
}
// WithWebApp adds web app parameter
func (i InlineKeyboardButton) WithWebApp(webApp *WebAppInfo) InlineKeyboardButton {
i.WebApp = webApp
return i
}
// WithLoginURL adds login URL parameter
func (i InlineKeyboardButton) WithLoginURL(loginURL *LoginURL) InlineKeyboardButton {
i.LoginURL = loginURL
return i
}
// WithSwitchInlineQuery adds switch inline query parameter
func (i InlineKeyboardButton) WithSwitchInlineQuery(switchInlineQuery string) InlineKeyboardButton {
i.SwitchInlineQuery = ToPtr(switchInlineQuery)
return i
}
// WithSwitchInlineQueryCurrentChat adds switch inline query current chat parameter
func (i InlineKeyboardButton) WithSwitchInlineQueryCurrentChat(
switchInlineQueryCurrentChat string,
) InlineKeyboardButton {
i.SwitchInlineQueryCurrentChat = ToPtr(switchInlineQueryCurrentChat)
return i
}
// WithSwitchInlineQueryChosenChat adds switch inline query chosen chat parameter
func (i InlineKeyboardButton) WithSwitchInlineQueryChosenChat(
switchInlineQueryChosenChat *SwitchInlineQueryChosenChat,
) InlineKeyboardButton {
i.SwitchInlineQueryChosenChat = switchInlineQueryChosenChat
return i
}
// WithCallbackGame adds callback game parameter
func (i InlineKeyboardButton) WithCallbackGame(callbackGame *CallbackGame) InlineKeyboardButton {
i.CallbackGame = callbackGame
return i
}
// WithPay adds pay parameter
func (i InlineKeyboardButton) WithPay() InlineKeyboardButton {
i.Pay = true
return i
}
// WithForceReply adds force reply parameter
func (f *ForceReply) WithForceReply() *ForceReply {
f.ForceReply = true
return f
}
// WithInputFieldPlaceholder adds input field placeholder parameter
func (f *ForceReply) WithInputFieldPlaceholder(inputFieldPlaceholder string) *ForceReply {
f.InputFieldPlaceholder = inputFieldPlaceholder
return f
}
// WithSelective adds selective parameter
func (f *ForceReply) WithSelective() *ForceReply {
f.Selective = true
return f
}
// WithText adds text parameter
func (m *MenuButtonWebApp) WithText(text string) *MenuButtonWebApp {
m.Text = text
return m
}
// WithWebApp adds web app parameter
func (m *MenuButtonWebApp) WithWebApp(webApp WebAppInfo) *MenuButtonWebApp {
m.WebApp = webApp
return m
}
// WithMedia adds media parameter
func (i *InputMediaPhoto) WithMedia(media InputFile) *InputMediaPhoto {
i.Media = media
return i
}
// WithCaption adds caption parameter
func (i *InputMediaPhoto) WithCaption(caption string) *InputMediaPhoto {
i.Caption = caption
return i
}
// WithParseMode adds parse mode parameter
func (i *InputMediaPhoto) WithParseMode(parseMode string) *InputMediaPhoto {
i.ParseMode = parseMode
return i
}
// WithCaptionEntities adds caption entities parameter
func (i *InputMediaPhoto) WithCaptionEntities(captionEntities ...MessageEntity) *InputMediaPhoto {
i.CaptionEntities = captionEntities
return i
}
// WithShowCaptionAboveMedia adds show caption above media parameter
func (i *InputMediaPhoto) WithShowCaptionAboveMedia() *InputMediaPhoto {
i.ShowCaptionAboveMedia = true
return i
}
// WithHasSpoiler adds has spoiler parameter
func (i *InputMediaPhoto) WithHasSpoiler() *InputMediaPhoto {
i.HasSpoiler = true
return i
}
// WithMedia adds media parameter
func (i *InputMediaVideo) WithMedia(media InputFile) *InputMediaVideo {
i.Media = media
return i
}
// WithThumbnail adds thumbnail parameter
func (i *InputMediaVideo) WithThumbnail(thumbnail *InputFile) *InputMediaVideo {
i.Thumbnail = thumbnail
return i
}
// WithCaption adds caption parameter
func (i *InputMediaVideo) WithCaption(caption string) *InputMediaVideo {
i.Caption = caption
return i
}
// WithParseMode adds parse mode parameter
func (i *InputMediaVideo) WithParseMode(parseMode string) *InputMediaVideo {
i.ParseMode = parseMode
return i
}
// WithCaptionEntities adds caption entities parameter
func (i *InputMediaVideo) WithCaptionEntities(captionEntities ...MessageEntity) *InputMediaVideo {
i.CaptionEntities = captionEntities
return i
}
// WithShowCaptionAboveMedia adds show caption above media parameter
func (i *InputMediaVideo) WithShowCaptionAboveMedia() *InputMediaVideo {
i.ShowCaptionAboveMedia = true
return i
}
// WithWidth adds width parameter
func (i *InputMediaVideo) WithWidth(width int) *InputMediaVideo {
i.Width = width
return i
}
// WithHeight adds height parameter
func (i *InputMediaVideo) WithHeight(height int) *InputMediaVideo {
i.Height = height
return i
}
// WithDuration adds duration parameter
func (i *InputMediaVideo) WithDuration(duration int) *InputMediaVideo {
i.Duration = duration
return i
}
// WithSupportsStreaming adds supports streaming parameter
func (i *InputMediaVideo) WithSupportsStreaming() *InputMediaVideo {
i.SupportsStreaming = true
return i
}
// WithHasSpoiler adds has spoiler parameter
func (i *InputMediaVideo) WithHasSpoiler() *InputMediaVideo {
i.HasSpoiler = true
return i
}
// WithMedia adds media parameter
func (i *InputMediaAnimation) WithMedia(media InputFile) *InputMediaAnimation {
i.Media = media
return i
}
// WithThumbnail adds thumbnail parameter
func (i *InputMediaAnimation) WithThumbnail(thumbnail *InputFile) *InputMediaAnimation {
i.Thumbnail = thumbnail
return i
}
// WithCaption adds caption parameter
func (i *InputMediaAnimation) WithCaption(caption string) *InputMediaAnimation {
i.Caption = caption
return i
}
// WithParseMode adds parse mode parameter
func (i *InputMediaAnimation) WithParseMode(parseMode string) *InputMediaAnimation {
i.ParseMode = parseMode
return i
}
// WithCaptionEntities adds caption entities parameter
func (i *InputMediaAnimation) WithCaptionEntities(captionEntities ...MessageEntity) *InputMediaAnimation {
i.CaptionEntities = captionEntities
return i
}
// WithShowCaptionAboveMedia adds show caption above media parameter
func (i *InputMediaAnimation) WithShowCaptionAboveMedia() *InputMediaAnimation {
i.ShowCaptionAboveMedia = true
return i
}
// WithWidth adds width parameter
func (i *InputMediaAnimation) WithWidth(width int) *InputMediaAnimation {
i.Width = width
return i
}
// WithHeight adds height parameter
func (i *InputMediaAnimation) WithHeight(height int) *InputMediaAnimation {
i.Height = height
return i
}
// WithDuration adds duration parameter
func (i *InputMediaAnimation) WithDuration(duration int) *InputMediaAnimation {
i.Duration = duration
return i
}
// WithHasSpoiler adds has spoiler parameter
func (i *InputMediaAnimation) WithHasSpoiler() *InputMediaAnimation {
i.HasSpoiler = true
return i
}
// WithMedia adds media parameter
func (i *InputMediaAudio) WithMedia(media InputFile) *InputMediaAudio {
i.Media = media
return i
}
// WithThumbnail adds thumbnail parameter
func (i *InputMediaAudio) WithThumbnail(thumbnail *InputFile) *InputMediaAudio {
i.Thumbnail = thumbnail
return i
}
// WithCaption adds caption parameter
func (i *InputMediaAudio) WithCaption(caption string) *InputMediaAudio {
i.Caption = caption
return i
}
// WithParseMode adds parse mode parameter
func (i *InputMediaAudio) WithParseMode(parseMode string) *InputMediaAudio {
i.ParseMode = parseMode
return i
}
// WithCaptionEntities adds caption entities parameter
func (i *InputMediaAudio) WithCaptionEntities(captionEntities ...MessageEntity) *InputMediaAudio {
i.CaptionEntities = captionEntities
return i
}
// WithDuration adds duration parameter
func (i *InputMediaAudio) WithDuration(duration int) *InputMediaAudio {
i.Duration = duration
return i
}
// WithPerformer adds performer parameter
func (i *InputMediaAudio) WithPerformer(performer string) *InputMediaAudio {
i.Performer = performer
return i
}
// WithTitle adds title parameter
func (i *InputMediaAudio) WithTitle(title string) *InputMediaAudio {
i.Title = title
return i
}
// WithMedia adds media parameter
func (i *InputMediaDocument) WithMedia(media InputFile) *InputMediaDocument {
i.Media = media
return i
}
// WithThumbnail adds thumbnail parameter
func (i *InputMediaDocument) WithThumbnail(thumbnail *InputFile) *InputMediaDocument {
i.Thumbnail = thumbnail
return i
}
// WithCaption adds caption parameter
func (i *InputMediaDocument) WithCaption(caption string) *InputMediaDocument {
i.Caption = caption
return i
}
// WithParseMode adds parse mode parameter
func (i *InputMediaDocument) WithParseMode(parseMode string) *InputMediaDocument {
i.ParseMode = parseMode
return i
}
// WithCaptionEntities adds caption entities parameter
func (i *InputMediaDocument) WithCaptionEntities(captionEntities ...MessageEntity) *InputMediaDocument {
i.CaptionEntities = captionEntities
return i
}
// WithDisableContentTypeDetection adds disable content type detection parameter
func (i *InputMediaDocument) WithDisableContentTypeDetection() *InputMediaDocument {
i.DisableContentTypeDetection = true
return i
}
// WithSticker adds sticker parameter
func (i *InputSticker) WithSticker(sticker InputFile) *InputSticker {
i.Sticker = sticker
return i
}
// WithFormat adds format parameter
func (i *InputSticker) WithFormat(format string) *InputSticker {
i.Format = format
return i
}
// WithEmojiList adds emoji list parameter
func (i *InputSticker) WithEmojiList(emojiList ...string) *InputSticker {
i.EmojiList = emojiList
return i
}
// WithMaskPosition adds mask position parameter
func (i *InputSticker) WithMaskPosition(maskPosition *MaskPosition) *InputSticker {
i.MaskPosition = maskPosition
return i
}
// WithKeywords adds keywords parameter
func (i *InputSticker) WithKeywords(keywords ...string) *InputSticker {
i.Keywords = keywords
return i
}
// WithID adds ID parameter
func (i *InlineQueryResultArticle) WithID(iD string) *InlineQueryResultArticle {
i.ID = iD
return i
}
// WithTitle adds title parameter
func (i *InlineQueryResultArticle) WithTitle(title string) *InlineQueryResultArticle {
i.Title = title
return i
}
// WithInputMessageContent adds input message content parameter
func (i *InlineQueryResultArticle) WithInputMessageContent(inputMessageContent InputMessageContent,
) *InlineQueryResultArticle {
i.InputMessageContent = inputMessageContent
return i
}
// WithReplyMarkup adds reply markup parameter
func (i *InlineQueryResultArticle) WithReplyMarkup(replyMarkup *InlineKeyboardMarkup) *InlineQueryResultArticle {
i.ReplyMarkup = replyMarkup
return i
}
// WithURL adds URL parameter
func (i *InlineQueryResultArticle) WithURL(url string) *InlineQueryResultArticle {
i.URL = url
return i
}
// WithHideURL adds hide URL parameter
func (i *InlineQueryResultArticle) WithHideURL() *InlineQueryResultArticle {
i.HideURL = true
return i
}
// WithDescription adds description parameter
func (i *InlineQueryResultArticle) WithDescription(description string) *InlineQueryResultArticle {
i.Description = description
return i
}
// WithThumbnailURL adds thumbnail URL parameter
func (i *InlineQueryResultArticle) WithThumbnailURL(thumbnailURL string) *InlineQueryResultArticle {
i.ThumbnailURL = thumbnailURL
return i
}
// WithThumbnailWidth adds thumbnail width parameter
func (i *InlineQueryResultArticle) WithThumbnailWidth(thumbnailWidth int) *InlineQueryResultArticle {
i.ThumbnailWidth = thumbnailWidth
return i
}
// WithThumbnailHeight adds thumbnail height parameter
func (i *InlineQueryResultArticle) WithThumbnailHeight(thumbnailHeight int) *InlineQueryResultArticle {
i.ThumbnailHeight = thumbnailHeight
return i
}
// WithID adds ID parameter
func (i *InlineQueryResultPhoto) WithID(iD string) *InlineQueryResultPhoto {
i.ID = iD
return i
}
// WithPhotoURL adds photo URL parameter
func (i *InlineQueryResultPhoto) WithPhotoURL(photoURL string) *InlineQueryResultPhoto {
i.PhotoURL = photoURL
return i
}
// WithThumbnailURL adds thumbnail URL parameter
func (i *InlineQueryResultPhoto) WithThumbnailURL(thumbnailURL string) *InlineQueryResultPhoto {
i.ThumbnailURL = thumbnailURL
return i
}
// WithPhotoWidth adds photo width parameter
func (i *InlineQueryResultPhoto) WithPhotoWidth(photoWidth int) *InlineQueryResultPhoto {
i.PhotoWidth = photoWidth
return i
}
// WithPhotoHeight adds photo height parameter
func (i *InlineQueryResultPhoto) WithPhotoHeight(photoHeight int) *InlineQueryResultPhoto {
i.PhotoHeight = photoHeight
return i
}
// WithTitle adds title parameter
func (i *InlineQueryResultPhoto) WithTitle(title string) *InlineQueryResultPhoto {
i.Title = title
return i
}
// WithDescription adds description parameter
func (i *InlineQueryResultPhoto) WithDescription(description string) *InlineQueryResultPhoto {
i.Description = description
return i
}
// WithCaption adds caption parameter
func (i *InlineQueryResultPhoto) WithCaption(caption string) *InlineQueryResultPhoto {
i.Caption = caption
return i
}
// WithParseMode adds parse mode parameter
func (i *InlineQueryResultPhoto) WithParseMode(parseMode string) *InlineQueryResultPhoto {
i.ParseMode = parseMode
return i
}
// WithCaptionEntities adds caption entities parameter
func (i *InlineQueryResultPhoto) WithCaptionEntities(captionEntities ...MessageEntity) *InlineQueryResultPhoto {
i.CaptionEntities = captionEntities
return i
}
// WithShowCaptionAboveMedia adds show caption above media parameter
func (i *InlineQueryResultPhoto) WithShowCaptionAboveMedia() *InlineQueryResultPhoto {
i.ShowCaptionAboveMedia = true
return i
}
// WithReplyMarkup adds reply markup parameter
func (i *InlineQueryResultPhoto) WithReplyMarkup(replyMarkup *InlineKeyboardMarkup) *InlineQueryResultPhoto {
i.ReplyMarkup = replyMarkup
return i
}
// WithInputMessageContent adds input message content parameter
func (i *InlineQueryResultPhoto) WithInputMessageContent(inputMessageContent InputMessageContent,
) *InlineQueryResultPhoto {
i.InputMessageContent = inputMessageContent
return i
}
// WithID adds ID parameter
func (i *InlineQueryResultGif) WithID(iD string) *InlineQueryResultGif {
i.ID = iD
return i
}
// WithGifURL adds gif URL parameter
func (i *InlineQueryResultGif) WithGifURL(gifURL string) *InlineQueryResultGif {
i.GifURL = gifURL
return i
}
// WithGifWidth adds gif width parameter
func (i *InlineQueryResultGif) WithGifWidth(gifWidth int) *InlineQueryResultGif {
i.GifWidth = gifWidth
return i
}
// WithGifHeight adds gif height parameter
func (i *InlineQueryResultGif) WithGifHeight(gifHeight int) *InlineQueryResultGif {
i.GifHeight = gifHeight
return i
}
// WithGifDuration adds gif duration parameter
func (i *InlineQueryResultGif) WithGifDuration(gifDuration int) *InlineQueryResultGif {
i.GifDuration = gifDuration
return i
}
// WithThumbnailURL adds thumbnail URL parameter
func (i *InlineQueryResultGif) WithThumbnailURL(thumbnailURL string) *InlineQueryResultGif {
i.ThumbnailURL = thumbnailURL
return i
}
// WithThumbnailMimeType adds thumbnail mime type parameter
func (i *InlineQueryResultGif) WithThumbnailMimeType(thumbnailMimeType string) *InlineQueryResultGif {
i.ThumbnailMimeType = thumbnailMimeType
return i
}
// WithTitle adds title parameter
func (i *InlineQueryResultGif) WithTitle(title string) *InlineQueryResultGif {
i.Title = title
return i
}
// WithCaption adds caption parameter
func (i *InlineQueryResultGif) WithCaption(caption string) *InlineQueryResultGif {
i.Caption = caption
return i
}
// WithParseMode adds parse mode parameter
func (i *InlineQueryResultGif) WithParseMode(parseMode string) *InlineQueryResultGif {
i.ParseMode = parseMode
return i
}
// WithCaptionEntities adds caption entities parameter
func (i *InlineQueryResultGif) WithCaptionEntities(captionEntities ...MessageEntity) *InlineQueryResultGif {
i.CaptionEntities = captionEntities
return i
}
// WithShowCaptionAboveMedia adds show caption above media parameter
func (i *InlineQueryResultGif) WithShowCaptionAboveMedia() *InlineQueryResultGif {
i.ShowCaptionAboveMedia = true
return i
}
// WithReplyMarkup adds reply markup parameter
func (i *InlineQueryResultGif) WithReplyMarkup(replyMarkup *InlineKeyboardMarkup) *InlineQueryResultGif {
i.ReplyMarkup = replyMarkup
return i
}
// WithInputMessageContent adds input message content parameter
func (i *InlineQueryResultGif) WithInputMessageContent(inputMessageContent InputMessageContent) *InlineQueryResultGif {
i.InputMessageContent = inputMessageContent
return i
}
// WithID adds ID parameter
func (i *InlineQueryResultMpeg4Gif) WithID(iD string) *InlineQueryResultMpeg4Gif {
i.ID = iD
return i
}
// WithMpeg4URL adds mpeg4 URL parameter
func (i *InlineQueryResultMpeg4Gif) WithMpeg4URL(mpeg4URL string) *InlineQueryResultMpeg4Gif {
i.Mpeg4URL = mpeg4URL
return i
}
// WithMpeg4Width adds mpeg4 width parameter
func (i *InlineQueryResultMpeg4Gif) WithMpeg4Width(mpeg4Width int) *InlineQueryResultMpeg4Gif {
i.Mpeg4Width = mpeg4Width
return i
}
// WithMpeg4Height adds mpeg4 height parameter
func (i *InlineQueryResultMpeg4Gif) WithMpeg4Height(mpeg4Height int) *InlineQueryResultMpeg4Gif {
i.Mpeg4Height = mpeg4Height
return i
}
// WithMpeg4Duration adds mpeg4 duration parameter
func (i *InlineQueryResultMpeg4Gif) WithMpeg4Duration(mpeg4Duration int) *InlineQueryResultMpeg4Gif {
i.Mpeg4Duration = mpeg4Duration
return i
}
// WithThumbnailURL adds thumbnail URL parameter
func (i *InlineQueryResultMpeg4Gif) WithThumbnailURL(thumbnailURL string) *InlineQueryResultMpeg4Gif {
i.ThumbnailURL = thumbnailURL
return i
}
// WithThumbnailMimeType adds thumbnail mime type parameter
func (i *InlineQueryResultMpeg4Gif) WithThumbnailMimeType(thumbnailMimeType string) *InlineQueryResultMpeg4Gif {
i.ThumbnailMimeType = thumbnailMimeType
return i
}
// WithTitle adds title parameter
func (i *InlineQueryResultMpeg4Gif) WithTitle(title string) *InlineQueryResultMpeg4Gif {
i.Title = title
return i
}
// WithCaption adds caption parameter
func (i *InlineQueryResultMpeg4Gif) WithCaption(caption string) *InlineQueryResultMpeg4Gif {
i.Caption = caption
return i
}
// WithParseMode adds parse mode parameter
func (i *InlineQueryResultMpeg4Gif) WithParseMode(parseMode string) *InlineQueryResultMpeg4Gif {
i.ParseMode = parseMode
return i
}
// WithCaptionEntities adds caption entities parameter
func (i *InlineQueryResultMpeg4Gif) WithCaptionEntities(captionEntities ...MessageEntity) *InlineQueryResultMpeg4Gif {
i.CaptionEntities = captionEntities
return i
}
// WithShowCaptionAboveMedia adds show caption above media parameter
func (i *InlineQueryResultMpeg4Gif) WithShowCaptionAboveMedia() *InlineQueryResultMpeg4Gif {
i.ShowCaptionAboveMedia = true
return i
}
// WithReplyMarkup adds reply markup parameter
func (i *InlineQueryResultMpeg4Gif) WithReplyMarkup(replyMarkup *InlineKeyboardMarkup) *InlineQueryResultMpeg4Gif {
i.ReplyMarkup = replyMarkup
return i
}
// WithInputMessageContent adds input message content parameter
func (i *InlineQueryResultMpeg4Gif) WithInputMessageContent(inputMessageContent InputMessageContent,
) *InlineQueryResultMpeg4Gif {
i.InputMessageContent = inputMessageContent
return i
}
// WithID adds ID parameter
func (i *InlineQueryResultVideo) WithID(iD string) *InlineQueryResultVideo {
i.ID = iD
return i
}
// WithVideoURL adds video URL parameter
func (i *InlineQueryResultVideo) WithVideoURL(videoURL string) *InlineQueryResultVideo {
i.VideoURL = videoURL
return i
}
// WithMimeType adds mime type parameter
func (i *InlineQueryResultVideo) WithMimeType(mimeType string) *InlineQueryResultVideo {
i.MimeType = mimeType
return i
}
// WithThumbnailURL adds thumbnail URL parameter
func (i *InlineQueryResultVideo) WithThumbnailURL(thumbnailURL string) *InlineQueryResultVideo {
i.ThumbnailURL = thumbnailURL
return i
}
// WithTitle adds title parameter
func (i *InlineQueryResultVideo) WithTitle(title string) *InlineQueryResultVideo {
i.Title = title
return i
}
// WithCaption adds caption parameter
func (i *InlineQueryResultVideo) WithCaption(caption string) *InlineQueryResultVideo {
i.Caption = caption
return i
}
// WithParseMode adds parse mode parameter
func (i *InlineQueryResultVideo) WithParseMode(parseMode string) *InlineQueryResultVideo {
i.ParseMode = parseMode
return i
}
// WithCaptionEntities adds caption entities parameter
func (i *InlineQueryResultVideo) WithCaptionEntities(captionEntities ...MessageEntity) *InlineQueryResultVideo {
i.CaptionEntities = captionEntities
return i
}
// WithShowCaptionAboveMedia adds show caption above media parameter
func (i *InlineQueryResultVideo) WithShowCaptionAboveMedia() *InlineQueryResultVideo {
i.ShowCaptionAboveMedia = true
return i
}
// WithVideoWidth adds video width parameter
func (i *InlineQueryResultVideo) WithVideoWidth(videoWidth int) *InlineQueryResultVideo {
i.VideoWidth = videoWidth
return i
}
// WithVideoHeight adds video height parameter
func (i *InlineQueryResultVideo) WithVideoHeight(videoHeight int) *InlineQueryResultVideo {
i.VideoHeight = videoHeight
return i
}