-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgen_helpers.go
More file actions
2476 lines (2063 loc) · 146 KB
/
Copy pathgen_helpers.go
File metadata and controls
2476 lines (2063 loc) · 146 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
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
// THIS FILE IS AUTOGENERATED. DO NOT EDIT.
// Regen by running 'go generate' in the repo root.
package gotdbot
// AddMember Adds a new member to a chat; requires can_invite_users member right. Members can't be added to private or secret chats. Returns information about members that weren't added
// It is a helper method for Client.AddChatMember
func (c *Chat) AddMember(client *Client, forwardLimit int32, userId int64) (*FailedToAddMembers, error) {
return client.AddChatMember(c.Id, forwardLimit, userId)
}
// AddMembers Adds multiple new members to a chat; requires can_invite_users member right. Currently, this method is available only in supergroups and channels.
// It is a helper method for Client.AddChatMembers
func (c *Chat) AddMembers(client *Client, userIds []int64) (*FailedToAddMembers, error) {
return client.AddChatMembers(c.Id, userIds)
}
// AddToList Adds a chat to a chat list. A chat can't be simultaneously in Main and Archive chat lists, so it is automatically removed from another one if needed
// It is a helper method for Client.AddChatToList
func (c *Chat) AddToList(client *Client, chatList ChatList) error {
return client.AddChatToList(c.Id, chatList)
}
// AddChecklistTasks Adds tasks to a checklist in a message
// It is a helper method for Client.AddChecklistTasks
func (c *Chat) AddChecklistTasks(client *Client, messageId int64, tasks []InputChecklistTask) error {
return client.AddChecklistTasks(c.Id, messageId, tasks)
}
// AddFileToDownloads Adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates.
// It is a helper method for Client.AddFileToDownloads
func (c *Chat) AddFileToDownloads(client *Client, fileId int32, messageId int64, priority int32) (*File, error) {
return client.AddFileToDownloads(c.Id, fileId, messageId, priority)
}
// AddLocalMessage Adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message
// It is a helper method for Client.AddLocalMessage
func (c *Chat) AddLocalMessage(client *Client, inputMessageContent InputMessageContent, senderId MessageSender, opts *AddLocalMessageOpts) (*Message, error) {
return client.AddLocalMessage(c.Id, inputMessageContent, senderId, opts)
}
// AddMessageReaction Adds a reaction or a tag to a message. Use getMessageAvailableReactions to receive the list of available reactions for the message
// It is a helper method for Client.AddMessageReaction
func (c *Chat) AddMessageReaction(client *Client, messageId int64, reactionType ReactionType, opts *AddMessageReactionOpts) error {
return client.AddMessageReaction(c.Id, messageId, reactionType, opts)
}
// AddOffer Sends a suggested post based on a previously sent message in a channel direct messages chat. Can be also used to suggest price or time change for an existing suggested post.
// It is a helper method for Client.AddOffer
func (c *Chat) AddOffer(client *Client, messageId int64, options *MessageSendOptions) (*Message, error) {
return client.AddOffer(c.Id, messageId, options)
}
// AddPendingPaidMessageReaction Adds the paid message reaction to a message. Use getMessageAvailableReactions to check whether the reaction is available for the message
// It is a helper method for Client.AddPendingPaidMessageReaction
func (c *Chat) AddPendingPaidMessageReaction(client *Client, messageId int64, starCount int64, opts *AddPendingPaidMessageReactionOpts) error {
return client.AddPendingPaidMessageReaction(c.Id, messageId, starCount, opts)
}
// AddPollOption Adds an option to a poll
// It is a helper method for Client.AddPollOption
func (c *Chat) AddPollOption(client *Client, messageId int64, option *InputPollOption) error {
return client.AddPollOption(c.Id, messageId, option)
}
// AddRecentlyFound Adds a chat to the list of recently found chats. The chat is added to the beginning of the list. If the chat is already in the list, it will be removed from the list first
// It is a helper method for Client.AddRecentlyFoundChat
func (c *Chat) AddRecentlyFound(client *Client) error {
return client.AddRecentlyFoundChat(c.Id)
}
// AddStoryAlbumStories Adds stories to the beginning of a previously created story album. If the album is owned by a supergroup or a channel chat, then
// It is a helper method for Client.AddStoryAlbumStories
func (c *Chat) AddStoryAlbumStories(client *Client, storyAlbumId int32, storyIds []int32) (*StoryAlbum, error) {
return client.AddStoryAlbumStories(c.Id, storyAlbumId, storyIds)
}
// ApproveSuggestedPost Approves a suggested post in a channel direct messages chat
// It is a helper method for Client.ApproveSuggestedPost
func (c *Chat) ApproveSuggestedPost(client *Client, messageId int64, sendDate int32) error {
return client.ApproveSuggestedPost(c.Id, messageId, sendDate)
}
// BanMember Bans a member in a chat; requires can_restrict_members administrator right. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first
// It is a helper method for Client.BanChatMember
func (c *Chat) BanMember(client *Client, bannedUntilDate int32, memberId MessageSender, opts *BanChatMemberOpts) error {
return client.BanChatMember(bannedUntilDate, c.Id, memberId, opts)
}
// Boost Boosts a chat and returns the list of available chat boost slots for the current user after the boost
// It is a helper method for Client.BoostChat
func (c *Chat) Boost(client *Client, slotIds []int32) (*ChatBoostSlots, error) {
return client.BoostChat(c.Id, slotIds)
}
// CanPostStory Checks whether the current user can post a story on behalf of a chat; requires can_post_stories administrator right for supergroup and channel chats
// It is a helper method for Client.CanPostStory
func (c *Chat) CanPostStory(client *Client) (CanPostStoryResult, error) {
return client.CanPostStory(c.Id)
}
// CheckUsername Checks whether a username can be set for a chat
// It is a helper method for Client.CheckChatUsername
func (c *Chat) CheckUsername(client *Client, username string) (CheckChatUsernameResult, error) {
return client.CheckChatUsername(c.Id, username)
}
// ClickAnimatedEmojiMessage Informs TDLib that a message with an animated emoji was clicked by the user. Returns a big animated sticker to be played or a 404 error if usual animation needs to be played
// It is a helper method for Client.ClickAnimatedEmojiMessage
func (c *Chat) ClickAnimatedEmojiMessage(client *Client, messageId int64) (*Sticker, error) {
return client.ClickAnimatedEmojiMessage(c.Id, messageId)
}
// ClickSponsoredMessage Informs TDLib that the user opened the sponsored chat via the button, the name, the chat photo, a mention in the sponsored message text, or the media in the sponsored message
// It is a helper method for Client.ClickChatSponsoredMessage
func (c *Chat) ClickSponsoredMessage(client *Client, messageId int64, opts *ClickChatSponsoredMessageOpts) error {
return client.ClickChatSponsoredMessage(c.Id, messageId, opts)
}
// Close Informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed
// It is a helper method for Client.CloseChat
func (c *Chat) Close(client *Client) error {
return client.CloseChat(c.Id)
}
// CommitPendingPaidMessageReactions Applies all pending paid reactions on a message
// It is a helper method for Client.CommitPendingPaidMessageReactions
func (c *Chat) CommitPendingPaidMessageReactions(client *Client, messageId int64) error {
return client.CommitPendingPaidMessageReactions(c.Id, messageId)
}
// CreateInviteLink Creates a new invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat
// It is a helper method for Client.CreateChatInviteLink
func (c *Chat) CreateInviteLink(client *Client, expirationDate int32, memberLimit int32, name string, opts *CreateChatInviteLinkOpts) (*ChatInviteLink, error) {
return client.CreateChatInviteLink(c.Id, expirationDate, memberLimit, name, opts)
}
// CreateSubscriptionInviteLink Creates a new subscription invite link for a channel chat. Requires can_invite_users right in the chat
// It is a helper method for Client.CreateChatSubscriptionInviteLink
func (c *Chat) CreateSubscriptionInviteLink(client *Client, name string, subscriptionPricing *StarSubscriptionPricing) (*ChatInviteLink, error) {
return client.CreateChatSubscriptionInviteLink(c.Id, name, subscriptionPricing)
}
// CreateForumTopic Creates a topic in a forum supergroup chat or a chat with a bot with topics; requires can_manage_topics administrator or can_create_topics member right in the supergroup
// It is a helper method for Client.CreateForumTopic
func (c *Chat) CreateForumTopic(client *Client, icon *ForumTopicIcon, name string, opts *CreateForumTopicOpts) (*ForumTopicInfo, error) {
return client.CreateForumTopic(c.Id, icon, name, opts)
}
// CreateVideo Creates a video chat (a group call bound to a chat); for basic groups, supergroups and channels only; requires can_manage_video_chats administrator right
// It is a helper method for Client.CreateVideoChat
func (c *Chat) CreateVideo(client *Client, startDate int32, opts *CreateVideoChatOpts) (*GroupCallId, error) {
return client.CreateVideoChat(c.Id, startDate, c.Title, opts)
}
// DeclineGroupCallInvitation Declines an invitation to an active group call via messageGroupCall. Can be called both by the sender and the receiver of the invitation
// It is a helper method for Client.DeclineGroupCallInvitation
func (c *Chat) DeclineGroupCallInvitation(client *Client, messageId int64) error {
return client.DeclineGroupCallInvitation(c.Id, messageId)
}
// DeclineSuggestedPost Declines a suggested post in a channel direct messages chat
// It is a helper method for Client.DeclineSuggestedPost
func (c *Chat) DeclineSuggestedPost(client *Client, comment string, messageId int64) error {
return client.DeclineSuggestedPost(c.Id, comment, messageId)
}
// DeleteAllRecentMessageReactionsFromSender Deletes all recent reactions added by the specified sender in a chat. Supported only for basic groups and supergroups; requires can_delete_messages administrator right
// It is a helper method for Client.DeleteAllRecentMessageReactionsFromSender
func (c *Chat) DeleteAllRecentMessageReactionsFromSender(client *Client, senderId MessageSender) error {
return client.DeleteAllRecentMessageReactionsFromSender(c.Id, senderId)
}
// DeleteAllRevokedInviteLinks Deletes all revoked chat invite links created by a given chat administrator. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links
// It is a helper method for Client.DeleteAllRevokedChatInviteLinks
func (c *Chat) DeleteAllRevokedInviteLinks(client *Client, creatorUserId int64) error {
return client.DeleteAllRevokedChatInviteLinks(c.Id, creatorUserId)
}
// Delete Deletes a chat along with all messages in the corresponding chat for all chat members. For group chats this will release the usernames and remove all members.
// It is a helper method for Client.DeleteChat
func (c *Chat) Delete(client *Client) error {
return client.DeleteChat(c.Id)
}
// DeleteBackground Deletes background in a specific chat
// It is a helper method for Client.DeleteChatBackground
func (c *Chat) DeleteBackground(client *Client, opts *DeleteChatBackgroundOpts) error {
return client.DeleteChatBackground(c.Id, opts)
}
// DeleteHistory Deletes all messages in the chat. Use chat.can_be_deleted_only_for_self and chat.can_be_deleted_for_all_users fields to find whether and how the method can be applied to the chat
// It is a helper method for Client.DeleteChatHistory
func (c *Chat) DeleteHistory(client *Client, opts *DeleteChatHistoryOpts) error {
return client.DeleteChatHistory(c.Id, opts)
}
// DeleteMessagesByDate Deletes all messages between the specified dates in a chat. Supported only for private chats and basic groups. Messages sent in the last 30 seconds will not be deleted
// It is a helper method for Client.DeleteChatMessagesByDate
func (c *Chat) DeleteMessagesByDate(client *Client, maxDate int32, minDate int32, opts *DeleteChatMessagesByDateOpts) error {
return client.DeleteChatMessagesByDate(c.Id, maxDate, minDate, opts)
}
// DeleteMessagesBySender Deletes all messages sent by the specified message sender in a chat. Supported only for supergroups; requires can_delete_messages administrator right
// It is a helper method for Client.DeleteChatMessagesBySender
func (c *Chat) DeleteMessagesBySender(client *Client, senderId MessageSender) error {
return client.DeleteChatMessagesBySender(c.Id, senderId)
}
// DeleteReplyMarkup Deletes the default reply markup from a chat. Must be called after a one-time keyboard or a replyMarkupForceReply reply markup has been used or dismissed
// It is a helper method for Client.DeleteChatReplyMarkup
func (c *Chat) DeleteReplyMarkup(client *Client, messageId int64) error {
return client.DeleteChatReplyMarkup(c.Id, messageId)
}
// DeleteDirectMessagesTopicHistory Deletes all messages in the topic in a channel direct messages chat administered by the current user
// It is a helper method for Client.DeleteDirectMessagesChatTopicHistory
func (c *Chat) DeleteDirectMessagesTopicHistory(client *Client, topicId int64) error {
return client.DeleteDirectMessagesChatTopicHistory(c.Id, topicId)
}
// DeleteDirectMessagesTopicMessagesByDate Deletes all messages between the specified dates in the topic in a channel direct messages chat administered by the current user. Messages sent in the last 30 seconds will not be deleted
// It is a helper method for Client.DeleteDirectMessagesChatTopicMessagesByDate
func (c *Chat) DeleteDirectMessagesTopicMessagesByDate(client *Client, maxDate int32, minDate int32, topicId int64) error {
return client.DeleteDirectMessagesChatTopicMessagesByDate(c.Id, maxDate, minDate, topicId)
}
// DeleteEphemeralMessage Deletes an ephemeral message; for bots only
// It is a helper method for Client.DeleteEphemeralMessage
func (c *Chat) DeleteEphemeralMessage(client *Client, ephemeralMessageId int32, receiverUserId int64) error {
return client.DeleteEphemeralMessage(c.Id, ephemeralMessageId, receiverUserId)
}
// DeleteForumTopic Deletes all messages from a topic in a forum supergroup chat or a chat with a bot with topics; requires can_delete_messages administrator right in the supergroup
// It is a helper method for Client.DeleteForumTopic
func (c *Chat) DeleteForumTopic(client *Client, forumTopicId int32) error {
return client.DeleteForumTopic(c.Id, forumTopicId)
}
// DeleteMessageReactionsFromSender Deletes all reactions added by the specified sender on a message
// It is a helper method for Client.DeleteMessageReactionsFromSender
func (c *Chat) DeleteMessageReactionsFromSender(client *Client, messageId int64, senderId MessageSender) error {
return client.DeleteMessageReactionsFromSender(c.Id, messageId, senderId)
}
// DeleteMessages Deletes messages
// It is a helper method for Client.DeleteMessages
func (c *Chat) DeleteMessages(client *Client, messageIds []int64, opts *DeleteMessagesOpts) error {
return client.DeleteMessages(c.Id, messageIds, opts)
}
// DeletePollOption Deletes an option from a poll
// It is a helper method for Client.DeletePollOption
func (c *Chat) DeletePollOption(client *Client, messageId int64, optionId string) error {
return client.DeletePollOption(c.Id, messageId, optionId)
}
// DeleteRevokedInviteLink Deletes revoked chat invite links. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links
// It is a helper method for Client.DeleteRevokedChatInviteLink
func (c *Chat) DeleteRevokedInviteLink(client *Client, inviteLink string) error {
return client.DeleteRevokedChatInviteLink(c.Id, inviteLink)
}
// DeleteStoryAlbum Deletes a story album. If the album is owned by a supergroup or a channel chat, then requires can_edit_stories administrator right in the chat
// It is a helper method for Client.DeleteStoryAlbum
func (c *Chat) DeleteStoryAlbum(client *Client, storyAlbumId int32) error {
return client.DeleteStoryAlbum(c.Id, storyAlbumId)
}
// EditBusinessMessageCaption Edits the caption of a message sent on behalf of a business account; for bots only
// It is a helper method for Client.EditBusinessMessageCaption
func (c *Chat) EditBusinessMessageCaption(client *Client, businessConnectionId string, messageId int64, opts *EditBusinessMessageCaptionOpts) (*BusinessMessage, error) {
return client.EditBusinessMessageCaption(businessConnectionId, c.Id, messageId, opts)
}
// EditBusinessMessageChecklist Edits the content of a checklist in a message sent on behalf of a business account; for bots only
// It is a helper method for Client.EditBusinessMessageChecklist
func (c *Chat) EditBusinessMessageChecklist(client *Client, businessConnectionId string, checklist *InputChecklist, messageId int64, opts *EditBusinessMessageChecklistOpts) (*BusinessMessage, error) {
return client.EditBusinessMessageChecklist(businessConnectionId, c.Id, checklist, messageId, opts)
}
// EditBusinessMessageLiveLocation Edits the content of a live location in a message sent on behalf of a business account; for bots only
// It is a helper method for Client.EditBusinessMessageLiveLocation
func (c *Chat) EditBusinessMessageLiveLocation(client *Client, businessConnectionId string, messageId int64, opts *EditBusinessMessageLiveLocationOpts) (*BusinessMessage, error) {
return client.EditBusinessMessageLiveLocation(businessConnectionId, c.Id, messageId, opts)
}
// EditBusinessMessageMedia Edits the media content of a message with a text, an animation, an audio, a document, a photo or a video in a message sent on behalf of a business account; for bots only
// It is a helper method for Client.EditBusinessMessageMedia
func (c *Chat) EditBusinessMessageMedia(client *Client, businessConnectionId string, inputMessageContent InputMessageContent, messageId int64, opts *EditBusinessMessageMediaOpts) (*BusinessMessage, error) {
return client.EditBusinessMessageMedia(businessConnectionId, c.Id, inputMessageContent, messageId, opts)
}
// EditBusinessMessageReplyMarkup Edits the reply markup of a message sent on behalf of a business account; for bots only
// It is a helper method for Client.EditBusinessMessageReplyMarkup
func (c *Chat) EditBusinessMessageReplyMarkup(client *Client, businessConnectionId string, messageId int64, opts *EditBusinessMessageReplyMarkupOpts) (*BusinessMessage, error) {
return client.EditBusinessMessageReplyMarkup(businessConnectionId, c.Id, messageId, opts)
}
// EditBusinessMessageText Edits the text of a text or game message sent on behalf of a business account; for bots only
// It is a helper method for Client.EditBusinessMessageText
func (c *Chat) EditBusinessMessageText(client *Client, businessConnectionId string, inputMessageContent InputMessageContent, messageId int64, opts *EditBusinessMessageTextOpts) (*BusinessMessage, error) {
return client.EditBusinessMessageText(businessConnectionId, c.Id, inputMessageContent, messageId, opts)
}
// EditInviteLink Edits a non-primary invite link for a chat. Available in basic groups, supergroups, and channels.
// It is a helper method for Client.EditChatInviteLink
func (c *Chat) EditInviteLink(client *Client, expirationDate int32, inviteLink string, memberLimit int32, name string, opts *EditChatInviteLinkOpts) (*ChatInviteLink, error) {
return client.EditChatInviteLink(c.Id, expirationDate, inviteLink, memberLimit, name, opts)
}
// EditSubscriptionInviteLink Edits a subscription invite link for a channel chat. Requires can_invite_users right in the chat for own links and owner privileges for other links
// It is a helper method for Client.EditChatSubscriptionInviteLink
func (c *Chat) EditSubscriptionInviteLink(client *Client, inviteLink string, name string) (*ChatInviteLink, error) {
return client.EditChatSubscriptionInviteLink(c.Id, inviteLink, name)
}
// EditEphemeralMessage Edits the text, caption or reply markup of an ephemeral message sent by the bot; for bots only
// It is a helper method for Client.EditEphemeralMessage
func (c *Chat) EditEphemeralMessage(client *Client, ephemeralMessageId int32, receiverUserId int64, opts *EditEphemeralMessageOpts) error {
return client.EditEphemeralMessage(c.Id, ephemeralMessageId, receiverUserId, opts)
}
// EditForumTopic Edits title and icon of a topic in a forum supergroup chat or a chat with a bot with topics; for supergroup chats requires can_manage_topics administrator right
// It is a helper method for Client.EditForumTopic
func (c *Chat) EditForumTopic(client *Client, forumTopicId int32, iconCustomEmojiId int64, name string, opts *EditForumTopicOpts) error {
return client.EditForumTopic(c.Id, forumTopicId, iconCustomEmojiId, name, opts)
}
// EditMessageCaption Edits the message content caption. Returns the edited message after the edit is completed on the server side
// It is a helper method for Client.EditMessageCaption
func (c *Chat) EditMessageCaption(client *Client, messageId int64, opts *EditMessageCaptionOpts) (*Message, error) {
return client.EditMessageCaption(c.Id, messageId, opts)
}
// EditMessageChecklist Edits the message content of a checklist. Returns the edited message after the edit is completed on the server side
// It is a helper method for Client.EditMessageChecklist
func (c *Chat) EditMessageChecklist(client *Client, checklist *InputChecklist, messageId int64, opts *EditMessageChecklistOpts) (*Message, error) {
return client.EditMessageChecklist(c.Id, checklist, messageId, opts)
}
// EditMessageLiveLocation Edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location.
// It is a helper method for Client.EditMessageLiveLocation
func (c *Chat) EditMessageLiveLocation(client *Client, messageId int64, opts *EditMessageLiveLocationOpts) (*Message, error) {
return client.EditMessageLiveLocation(c.Id, messageId, opts)
}
// EditMessageMedia Edits the media content of a message, including message caption. If only the caption needs to be edited, use editMessageCaption instead.
// It is a helper method for Client.EditMessageMedia
func (c *Chat) EditMessageMedia(client *Client, inputMessageContent InputMessageContent, messageId int64, opts *EditMessageMediaOpts) (*Message, error) {
return client.EditMessageMedia(c.Id, inputMessageContent, messageId, opts)
}
// EditMessageReplyMarkup Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side
// It is a helper method for Client.EditMessageReplyMarkup
func (c *Chat) EditMessageReplyMarkup(client *Client, messageId int64, opts *EditMessageReplyMarkupOpts) (*Message, error) {
return client.EditMessageReplyMarkup(c.Id, messageId, opts)
}
// EditMessageSchedulingState Edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed
// It is a helper method for Client.EditMessageSchedulingState
func (c *Chat) EditMessageSchedulingState(client *Client, messageId int64, opts *EditMessageSchedulingStateOpts) error {
return client.EditMessageSchedulingState(c.Id, messageId, opts)
}
// EditMessageText Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side
// It is a helper method for Client.EditMessageText
func (c *Chat) EditMessageText(client *Client, inputMessageContent InputMessageContent, messageId int64, opts *EditMessageTextOpts) (*Message, error) {
return client.EditMessageText(c.Id, inputMessageContent, messageId, opts)
}
// ForwardMessages Forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message
// It is a helper method for Client.ForwardMessages
func (c *Chat) ForwardMessages(client *Client, fromChatId int64, messageIds []int64, opts *ForwardMessagesOpts) (*Messages, error) {
return client.ForwardMessages(c.Id, fromChatId, messageIds, opts)
}
// GetAllStickerEmojis Returns unique emoji that correspond to stickers to be found by the getStickers(sticker_type, query, 1000000, chat_id)
// It is a helper method for Client.GetAllStickerEmojis
func (c *Chat) GetAllStickerEmojis(client *Client, query string, stickerType StickerType, opts *GetAllStickerEmojisOpts) (*Emojis, error) {
return client.GetAllStickerEmojis(c.Id, query, stickerType, opts)
}
// GetCallbackQueryAnswer Sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires
// It is a helper method for Client.GetCallbackQueryAnswer
func (c *Chat) GetCallbackQueryAnswer(client *Client, messageId int64, payload CallbackQueryPayload) (*CallbackQueryAnswer, error) {
return client.GetCallbackQueryAnswer(c.Id, messageId, payload)
}
// GetCallbackQueryMessage Returns information about a message with the callback button that originated a callback query; for bots only
// It is a helper method for Client.GetCallbackQueryMessage
func (c *Chat) GetCallbackQueryMessage(client *Client, callbackQueryId int64, messageId int64) (*Message, error) {
return client.GetCallbackQueryMessage(callbackQueryId, c.Id, messageId)
}
// Get Returns information about a chat by its identifier. This is an offline method if the current user is not a bot
// It is a helper method for Client.GetChat
func (c *Chat) Get(client *Client) (*Chat, error) {
return client.GetChat(c.Id)
}
// GetActiveStories Returns the list of active stories posted by the given chat
// It is a helper method for Client.GetChatActiveStories
func (c *Chat) GetActiveStories(client *Client) (*ChatActiveStories, error) {
return client.GetChatActiveStories(c.Id)
}
// GetAdministrators Returns a list of administrators of the chat with their custom titles
// It is a helper method for Client.GetChatAdministrators
func (c *Chat) GetAdministrators(client *Client) (*ChatAdministrators, error) {
return client.GetChatAdministrators(c.Id)
}
// GetArchivedStories Returns the list of all stories posted by the given chat; requires can_edit_stories administrator right in the chat.
// It is a helper method for Client.GetChatArchivedStories
func (c *Chat) GetArchivedStories(client *Client, fromStoryId int32, limit int32) (*Stories, error) {
return client.GetChatArchivedStories(c.Id, fromStoryId, limit)
}
// GetAvailableMessageSenders Returns the list of message sender identifiers, which can be used to send messages in a chat
// It is a helper method for Client.GetChatAvailableMessageSenders
func (c *Chat) GetAvailableMessageSenders(client *Client) (*ChatMessageSenders, error) {
return client.GetChatAvailableMessageSenders(c.Id)
}
// GetAvailablePaidMessageReactionSenders Returns the list of message sender identifiers, which can be used to send a paid reaction in a chat
// It is a helper method for Client.GetChatAvailablePaidMessageReactionSenders
func (c *Chat) GetAvailablePaidMessageReactionSenders(client *Client) (*MessageSenders, error) {
return client.GetChatAvailablePaidMessageReactionSenders(c.Id)
}
// GetBoostLink Returns an HTTPS link to boost the specified supergroup or channel chat
// It is a helper method for Client.GetChatBoostLink
func (c *Chat) GetBoostLink(client *Client) (*ChatBoostLink, error) {
return client.GetChatBoostLink(c.Id)
}
// GetBoosts Returns the list of boosts applied to a chat; requires administrator rights in the chat
// It is a helper method for Client.GetChatBoosts
func (c *Chat) GetBoosts(client *Client, limit int32, offset string, opts *GetChatBoostsOpts) (*FoundChatBoosts, error) {
return client.GetChatBoosts(c.Id, limit, offset, opts)
}
// GetBoostStatus Returns the current boost status for a supergroup or a channel chat
// It is a helper method for Client.GetChatBoostStatus
func (c *Chat) GetBoostStatus(client *Client) (*ChatBoostStatus, error) {
return client.GetChatBoostStatus(c.Id)
}
// GetEventLog Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only in supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i.e., in order of decreasing event_id)
// It is a helper method for Client.GetChatEventLog
func (c *Chat) GetEventLog(client *Client, fromEventId int64, limit int32, query string, userIds []int64, opts *GetChatEventLogOpts) (*ChatEvents, error) {
return client.GetChatEventLog(c.Id, fromEventId, limit, query, userIds, opts)
}
// GetHistory Returns messages in a chat. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id).
// It is a helper method for Client.GetChatHistory
func (c *Chat) GetHistory(client *Client, fromMessageId int64, limit int32, offset int32, opts *GetChatHistoryOpts) (*Messages, error) {
return client.GetChatHistory(c.Id, fromMessageId, limit, offset, opts)
}
// GetInviteLink Returns information about an invite link. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links
// It is a helper method for Client.GetChatInviteLink
func (c *Chat) GetInviteLink(client *Client, inviteLink string) (*ChatInviteLink, error) {
return client.GetChatInviteLink(c.Id, inviteLink)
}
// GetInviteLinkCounts Returns the list of chat administrators with number of their invite links. Requires owner privileges in the chat
// It is a helper method for Client.GetChatInviteLinkCounts
func (c *Chat) GetInviteLinkCounts(client *Client) (*ChatInviteLinkCounts, error) {
return client.GetChatInviteLinkCounts(c.Id)
}
// GetInviteLinkMembers Returns chat members joined a chat via an invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links
// It is a helper method for Client.GetChatInviteLinkMembers
func (c *Chat) GetInviteLinkMembers(client *Client, inviteLink string, limit int32, opts *GetChatInviteLinkMembersOpts) (*ChatInviteLinkMembers, error) {
return client.GetChatInviteLinkMembers(c.Id, inviteLink, limit, opts)
}
// GetInviteLinks Returns invite links for a chat created by specified administrator. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links
// It is a helper method for Client.GetChatInviteLinks
func (c *Chat) GetInviteLinks(client *Client, creatorUserId int64, limit int32, offsetDate int32, offsetInviteLink string, opts *GetChatInviteLinksOpts) (*ChatInviteLinks, error) {
return client.GetChatInviteLinks(c.Id, creatorUserId, limit, offsetDate, offsetInviteLink, opts)
}
// GetJoinRequests Returns pending join requests in a chat
// It is a helper method for Client.GetChatJoinRequests
func (c *Chat) GetJoinRequests(client *Client, inviteLink string, limit int32, query string, opts *GetChatJoinRequestsOpts) (*ChatJoinRequests, error) {
return client.GetChatJoinRequests(c.Id, inviteLink, limit, query, opts)
}
// GetListsToAddChat Returns chat lists to which the chat can be added. This is an offline method
// It is a helper method for Client.GetChatListsToAddChat
func (c *Chat) GetListsToAddChat(client *Client) (*ChatLists, error) {
return client.GetChatListsToAddChat(c.Id)
}
// GetMember Returns information about a single member of a chat
// It is a helper method for Client.GetChatMember
func (c *Chat) GetMember(client *Client, memberId MessageSender) (*ChatMember, error) {
return client.GetChatMember(c.Id, memberId)
}
// GetMessageByDate Returns the last message sent in a chat no later than the specified date. Returns a 404 error if such message doesn't exist
// It is a helper method for Client.GetChatMessageByDate
func (c *Chat) GetMessageByDate(client *Client, date int32) (*Message, error) {
return client.GetChatMessageByDate(c.Id, date)
}
// GetMessageCalendar Returns information about the next messages of the specified type in the chat split by days. Returns the results in reverse chronological order. Can return partial result for the last returned day. Behavior of this method depends on the value of the option "utc_time_offset"
// It is a helper method for Client.GetChatMessageCalendar
func (c *Chat) GetMessageCalendar(client *Client, filter SearchMessagesFilter, fromMessageId int64, opts *GetChatMessageCalendarOpts) (*MessageCalendar, error) {
return client.GetChatMessageCalendar(c.Id, filter, fromMessageId, opts)
}
// GetMessageCount Returns approximate number of messages of the specified type in the chat or its topic
// It is a helper method for Client.GetChatMessageCount
func (c *Chat) GetMessageCount(client *Client, filter SearchMessagesFilter, opts *GetChatMessageCountOpts) (*Count, error) {
return client.GetChatMessageCount(c.Id, filter, opts)
}
// GetMessagePosition Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat and topic. Cannot be used in secret chats
// It is a helper method for Client.GetChatMessagePosition
func (c *Chat) GetMessagePosition(client *Client, filter SearchMessagesFilter, messageId int64, opts *GetChatMessagePositionOpts) (*Count, error) {
return client.GetChatMessagePosition(c.Id, filter, messageId, opts)
}
// GetOwnerAfterLeaving Returns the user who will become the owner of the chat after 7 days if the current user does not return to the supergroup or channel during that period or immediately for basic groups;
// It is a helper method for Client.GetChatOwnerAfterLeaving
func (c *Chat) GetOwnerAfterLeaving(client *Client) (*User, error) {
return client.GetChatOwnerAfterLeaving(c.Id)
}
// GetPinnedMessage Returns information about a newest pinned message in the chat. Returns a 404 error if the message doesn't exist
// It is a helper method for Client.GetChatPinnedMessage
func (c *Chat) GetPinnedMessage(client *Client) (*Message, error) {
return client.GetChatPinnedMessage(c.Id)
}
// GetPostedToChatPageStories Returns the list of stories that posted by the given chat to its chat page. If from_story_id == 0, then pinned stories are returned first.
// It is a helper method for Client.GetChatPostedToChatPageStories
func (c *Chat) GetPostedToChatPageStories(client *Client, fromStoryId int32, limit int32) (*Stories, error) {
return client.GetChatPostedToChatPageStories(c.Id, fromStoryId, limit)
}
// GetRevenueStatistics Returns detailed revenue statistics about a chat. Currently, this method can be used only
// It is a helper method for Client.GetChatRevenueStatistics
func (c *Chat) GetRevenueStatistics(client *Client, opts *GetChatRevenueStatisticsOpts) (*ChatRevenueStatistics, error) {
return client.GetChatRevenueStatistics(c.Id, opts)
}
// GetRevenueTransactions Returns the list of revenue transactions for a chat. Currently, this method can be used only
// It is a helper method for Client.GetChatRevenueTransactions
func (c *Chat) GetRevenueTransactions(client *Client, limit int32, offset string) (*ChatRevenueTransactions, error) {
return client.GetChatRevenueTransactions(c.Id, limit, offset)
}
// GetRevenueWithdrawalUrl Returns a URL for chat revenue withdrawal; requires owner privileges in the channel chat or the bot. Currently, this method can be used only
// It is a helper method for Client.GetChatRevenueWithdrawalUrl
func (c *Chat) GetRevenueWithdrawalUrl(client *Client, password string) (*HttpUrl, error) {
return client.GetChatRevenueWithdrawalUrl(c.Id, password)
}
// GetScheduledMessages Returns all scheduled messages in a chat. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id)
// It is a helper method for Client.GetChatScheduledMessages
func (c *Chat) GetScheduledMessages(client *Client) (*Messages, error) {
return client.GetChatScheduledMessages(c.Id)
}
// GetSimilarChatCount Returns approximate number of chats similar to the given chat
// It is a helper method for Client.GetChatSimilarChatCount
func (c *Chat) GetSimilarChatCount(client *Client, opts *GetChatSimilarChatCountOpts) (*Count, error) {
return client.GetChatSimilarChatCount(c.Id, opts)
}
// GetSimilarChats Returns a list of chats similar to the given chat
// It is a helper method for Client.GetChatSimilarChats
func (c *Chat) GetSimilarChats(client *Client) (*Chats, error) {
return client.GetChatSimilarChats(c.Id)
}
// GetSparseMessagePositions Returns sparse positions of messages of the specified type in the chat to be used for Shared Media scroll implementation. Returns the results in reverse chronological order (i.e., in order of decreasing message_id).
// It is a helper method for Client.GetChatSparseMessagePositions
func (c *Chat) GetSparseMessagePositions(client *Client, filter SearchMessagesFilter, fromMessageId int64, limit int32, savedMessagesTopicId int64) (*MessagePositions, error) {
return client.GetChatSparseMessagePositions(c.Id, filter, fromMessageId, limit, savedMessagesTopicId)
}
// GetSponsoredMessages Returns sponsored messages to be shown in a chat; for channel chats and chats with bots only
// It is a helper method for Client.GetChatSponsoredMessages
func (c *Chat) GetSponsoredMessages(client *Client) (*SponsoredMessages, error) {
return client.GetChatSponsoredMessages(c.Id)
}
// GetStatistics Returns detailed statistics about a chat. Currently, this method can be used only for supergroups and channels. Can be used only if supergroupFullInfo.can_get_statistics == true
// It is a helper method for Client.GetChatStatistics
func (c *Chat) GetStatistics(client *Client, opts *GetChatStatisticsOpts) (ChatStatistics, error) {
return client.GetChatStatistics(c.Id, opts)
}
// GetStoryAlbums Returns the list of story albums owned by the given chat
// It is a helper method for Client.GetChatStoryAlbums
func (c *Chat) GetStoryAlbums(client *Client) (*StoryAlbums, error) {
return client.GetChatStoryAlbums(c.Id)
}
// GetDirectMessagesTopic Returns information about the topic in a channel direct messages chat administered by the current user
// It is a helper method for Client.GetDirectMessagesChatTopic
func (c *Chat) GetDirectMessagesTopic(client *Client, topicId int64) (*DirectMessagesChatTopic, error) {
return client.GetDirectMessagesChatTopic(c.Id, topicId)
}
// GetDirectMessagesTopicHistory Returns messages in the topic in a channel direct messages chat administered by the current user. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id)
// It is a helper method for Client.GetDirectMessagesChatTopicHistory
func (c *Chat) GetDirectMessagesTopicHistory(client *Client, fromMessageId int64, limit int32, offset int32, topicId int64) (*Messages, error) {
return client.GetDirectMessagesChatTopicHistory(c.Id, fromMessageId, limit, offset, topicId)
}
// GetDirectMessagesTopicMessageByDate Returns the last message sent in the topic in a channel direct messages chat administered by the current user no later than the specified date
// It is a helper method for Client.GetDirectMessagesChatTopicMessageByDate
func (c *Chat) GetDirectMessagesTopicMessageByDate(client *Client, date int32, topicId int64) (*Message, error) {
return client.GetDirectMessagesChatTopicMessageByDate(c.Id, date, topicId)
}
// GetDirectMessagesTopicRevenue Returns the total number of Telegram Stars received by the channel chat for direct messages from the given topic
// It is a helper method for Client.GetDirectMessagesChatTopicRevenue
func (c *Chat) GetDirectMessagesTopicRevenue(client *Client, topicId int64) (*StarCount, error) {
return client.GetDirectMessagesChatTopicRevenue(c.Id, topicId)
}
// GetForumTopic Returns information about a topic in a forum supergroup chat or a chat with a bot with topics
// It is a helper method for Client.GetForumTopic
func (c *Chat) GetForumTopic(client *Client, forumTopicId int32) (*ForumTopic, error) {
return client.GetForumTopic(c.Id, forumTopicId)
}
// GetForumTopicHistory Returns messages in a topic in a forum supergroup chat or a chat with a bot with topics. The messages are returned in reverse chronological order
// It is a helper method for Client.GetForumTopicHistory
func (c *Chat) GetForumTopicHistory(client *Client, forumTopicId int32, fromMessageId int64, limit int32, offset int32) (*Messages, error) {
return client.GetForumTopicHistory(c.Id, forumTopicId, fromMessageId, limit, offset)
}
// GetForumTopicLink Returns an HTTPS link to a topic in a forum supergroup chat. This is an offline method
// It is a helper method for Client.GetForumTopicLink
func (c *Chat) GetForumTopicLink(client *Client, forumTopicId int32) (*MessageLink, error) {
return client.GetForumTopicLink(c.Id, forumTopicId)
}
// GetForumTopics Returns found forum topics in a forum supergroup chat or a chat with a bot with topics. This is a temporary method for getting information about topic list from the server
// It is a helper method for Client.GetForumTopics
func (c *Chat) GetForumTopics(client *Client, limit int32, offsetDate int32, offsetForumTopicId int32, offsetMessageId int64, query string) (*ForumTopics, error) {
return client.GetForumTopics(c.Id, limit, offsetDate, offsetForumTopicId, offsetMessageId, query)
}
// GetFullRichMessage Returns the full version of a rich message
// It is a helper method for Client.GetFullRichMessage
func (c *Chat) GetFullRichMessage(client *Client, messageId int64) (*RichMessage, error) {
return client.GetFullRichMessage(c.Id, messageId)
}
// GetGameHighScores Returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only
// It is a helper method for Client.GetGameHighScores
func (c *Chat) GetGameHighScores(client *Client, messageId int64, userId int64) (*GameHighScores, error) {
return client.GetGameHighScores(c.Id, messageId, userId)
}
// GetGiveawayInfo Returns information about a giveaway
// It is a helper method for Client.GetGiveawayInfo
func (c *Chat) GetGiveawayInfo(client *Client, messageId int64) (GiveawayInfo, error) {
return client.GetGiveawayInfo(c.Id, messageId)
}
// GetInlineQueryResults Sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires
// It is a helper method for Client.GetInlineQueryResults
func (c *Chat) GetInlineQueryResults(client *Client, botUserId int64, offset string, query string, opts *GetInlineQueryResultsOpts) (*InlineQueryResults, error) {
return client.GetInlineQueryResults(botUserId, c.Id, offset, query, opts)
}
// GetLiveStoryRtmpUrl Returns RTMP URL for streaming to a live story; requires can_post_stories administrator right for channel chats
// It is a helper method for Client.GetLiveStoryRtmpUrl
func (c *Chat) GetLiveStoryRtmpUrl(client *Client) (*RtmpUrl, error) {
return client.GetLiveStoryRtmpUrl(c.Id)
}
// GetLoginUrl Returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl.
// It is a helper method for Client.GetLoginUrl
func (c *Chat) GetLoginUrl(client *Client, buttonId int64, messageId int64, opts *GetLoginUrlOpts) (*HttpUrl, error) {
return client.GetLoginUrl(buttonId, c.Id, messageId, opts)
}
// GetLoginUrlInfo Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button
// It is a helper method for Client.GetLoginUrlInfo
func (c *Chat) GetLoginUrlInfo(client *Client, buttonId int64, messageId int64) (LoginUrlInfo, error) {
return client.GetLoginUrlInfo(buttonId, c.Id, messageId)
}
// GetMainWebApp Returns information needed to open the main Web App of a bot
// It is a helper method for Client.GetMainWebApp
func (c *Chat) GetMainWebApp(client *Client, botUserId int64, parameters *WebAppOpenParameters, startParameter string) (*MainWebApp, error) {
return client.GetMainWebApp(botUserId, c.Id, parameters, startParameter)
}
// GetMapThumbnailFile Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded
// It is a helper method for Client.GetMapThumbnailFile
func (c *Chat) GetMapThumbnailFile(client *Client, height int32, location *Location, scale int32, width int32, zoom int32) (*File, error) {
return client.GetMapThumbnailFile(c.Id, height, location, scale, width, zoom)
}
// GetMessage Returns information about a message. Returns a 404 error if the message doesn't exist
// It is a helper method for Client.GetMessage
func (c *Chat) GetMessage(client *Client, messageId int64) (*Message, error) {
return client.GetMessage(c.Id, messageId)
}
// GetMessageAddedReactions Returns reactions added for a message, along with their sender
// It is a helper method for Client.GetMessageAddedReactions
func (c *Chat) GetMessageAddedReactions(client *Client, limit int32, messageId int64, offset string, opts *GetMessageAddedReactionsOpts) (*AddedReactions, error) {
return client.GetMessageAddedReactions(c.Id, limit, messageId, offset, opts)
}
// GetMessageAuthor Returns information about actual author of a message sent on behalf of a channel. The method can be called if messageProperties.can_get_author == true
// It is a helper method for Client.GetMessageAuthor
func (c *Chat) GetMessageAuthor(client *Client, messageId int64) (*User, error) {
return client.GetMessageAuthor(c.Id, messageId)
}
// GetMessageAvailableReactions Returns reactions, which can be added to a message. The list can change after updateActiveEmojiReactions, updateChatAvailableReactions for the chat, or updateMessageInteractionInfo for the message
// It is a helper method for Client.GetMessageAvailableReactions
func (c *Chat) GetMessageAvailableReactions(client *Client, messageId int64, rowSize int32) (*AvailableReactions, error) {
return client.GetMessageAvailableReactions(c.Id, messageId, rowSize)
}
// GetMessageEmbeddingCode Returns an HTML code for embedding the message. Available only if messageProperties.can_get_embedding_code
// It is a helper method for Client.GetMessageEmbeddingCode
func (c *Chat) GetMessageEmbeddingCode(client *Client, messageId int64, opts *GetMessageEmbeddingCodeOpts) (*Text, error) {
return client.GetMessageEmbeddingCode(c.Id, messageId, opts)
}
// GetMessageImportConfirmationText Returns a confirmation text to be shown to the user before starting message import
// It is a helper method for Client.GetMessageImportConfirmationText
func (c *Chat) GetMessageImportConfirmationText(client *Client) (*Text, error) {
return client.GetMessageImportConfirmationText(c.Id)
}
// GetMessageLink Returns an HTTPS link to a message in a chat. Available only if messageProperties.can_get_link, or if messageProperties.can_get_media_timestamp_links and a media timestamp link is generated. This is an offline method
// It is a helper method for Client.GetMessageLink
func (c *Chat) GetMessageLink(client *Client, checklistTaskId int32, mediaTimestamp int32, messageId int64, pollOptionId string, opts *GetMessageLinkOpts) (*MessageLink, error) {
return client.GetMessageLink(c.Id, checklistTaskId, mediaTimestamp, messageId, pollOptionId, opts)
}
// GetMessageLocally Returns information about a message, if it is available without sending network request. Returns a 404 error if message isn't available locally. This is an offline method
// It is a helper method for Client.GetMessageLocally
func (c *Chat) GetMessageLocally(client *Client, messageId int64) (*Message, error) {
return client.GetMessageLocally(c.Id, messageId)
}
// GetMessageProperties Returns properties of a message. This is an offline method
// It is a helper method for Client.GetMessageProperties
func (c *Chat) GetMessageProperties(client *Client, messageId int64) (*MessageProperties, error) {
return client.GetMessageProperties(c.Id, messageId)
}
// GetMessagePublicForwards Returns forwarded copies of a channel message to different public channels and public reposts as a story. Can be used only if messageProperties.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib
// It is a helper method for Client.GetMessagePublicForwards
func (c *Chat) GetMessagePublicForwards(client *Client, limit int32, messageId int64, offset string) (*PublicForwards, error) {
return client.GetMessagePublicForwards(c.Id, limit, messageId, offset)
}
// GetMessageReadDate Returns read date of a recent outgoing message in a private chat. The method can be called if messageProperties.can_get_read_date == true
// It is a helper method for Client.GetMessageReadDate
func (c *Chat) GetMessageReadDate(client *Client, messageId int64) (MessageReadDate, error) {
return client.GetMessageReadDate(c.Id, messageId)
}
// GetMessages Returns information about messages. If a message is not found, returns null on the corresponding position of the result
// It is a helper method for Client.GetMessages
func (c *Chat) GetMessages(client *Client, messageIds []int64) (*Messages, error) {
return client.GetMessages(c.Id, messageIds)
}
// GetMessageStatistics Returns detailed statistics about a message. Can be used only if messageProperties.can_get_statistics == true
// It is a helper method for Client.GetMessageStatistics
func (c *Chat) GetMessageStatistics(client *Client, messageId int64, opts *GetMessageStatisticsOpts) (*MessageStatistics, error) {
return client.GetMessageStatistics(c.Id, messageId, opts)
}
// GetMessageThread Returns information about a message thread. Can be used only if messageProperties.can_get_message_thread == true
// It is a helper method for Client.GetMessageThread
func (c *Chat) GetMessageThread(client *Client, messageId int64) (*MessageThreadInfo, error) {
return client.GetMessageThread(c.Id, messageId)
}
// GetMessageThreadHistory Returns messages in a message thread of a message. Can be used only if messageProperties.can_get_message_thread == true. Message thread of a channel message is in the channel's linked supergroup.
// It is a helper method for Client.GetMessageThreadHistory
func (c *Chat) GetMessageThreadHistory(client *Client, fromMessageId int64, limit int32, messageId int64, offset int32) (*Messages, error) {
return client.GetMessageThreadHistory(c.Id, fromMessageId, limit, messageId, offset)
}
// GetMessageViewers Returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, opened content of the message, are returned. The method can be called if messageProperties.can_get_viewers == true
// It is a helper method for Client.GetMessageViewers
func (c *Chat) GetMessageViewers(client *Client, messageId int64) (*MessageViewers, error) {
return client.GetMessageViewers(c.Id, messageId)
}
// GetPaymentReceipt Returns information about a successful payment
// It is a helper method for Client.GetPaymentReceipt
func (c *Chat) GetPaymentReceipt(client *Client, messageId int64) (*PaymentReceipt, error) {
return client.GetPaymentReceipt(c.Id, messageId)
}
// GetPollOptionProperties Returns properties of a poll option. This is an offline method
// It is a helper method for Client.GetPollOptionProperties
func (c *Chat) GetPollOptionProperties(client *Client, messageId int64, pollOptionId string) (*PollOptionProperties, error) {
return client.GetPollOptionProperties(c.Id, messageId, pollOptionId)
}
// GetPollVoters Returns message senders voted for the specified option in a poll; use poll.can_get_voters to check whether the method can be used.
// It is a helper method for Client.GetPollVoters
func (c *Chat) GetPollVoters(client *Client, limit int32, messageId int64, offset int32, optionId int32) (*PollVoters, error) {
return client.GetPollVoters(c.Id, limit, messageId, offset, optionId)
}
// GetPollVoteStatistics Returns statistics of poll votes in a poll
// It is a helper method for Client.GetPollVoteStatistics
func (c *Chat) GetPollVoteStatistics(client *Client, messageId int64, opts *GetPollVoteStatisticsOpts) (*PollVoteStatistics, error) {
return client.GetPollVoteStatistics(c.Id, messageId, opts)
}
// GetRepliedMessage Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message for messagePinMessage,
// It is a helper method for Client.GetRepliedMessage
func (c *Chat) GetRepliedMessage(client *Client, messageId int64) (*Message, error) {
return client.GetRepliedMessage(c.Id, messageId)
}
// GetStatisticalGraph Loads an asynchronous or a zoomed in statistical graph
// It is a helper method for Client.GetStatisticalGraph
func (c *Chat) GetStatisticalGraph(client *Client, token string, x int64) (StatisticalGraph, error) {
return client.GetStatisticalGraph(c.Id, token, x)
}
// GetStickers Returns stickers from the installed sticker sets that correspond to any of the given emoji or can be found by sticker-specific keywords. If the query is non-empty, then favorite, recently used or trending stickers may also be returned
// It is a helper method for Client.GetStickers
func (c *Chat) GetStickers(client *Client, limit int32, query string, stickerType StickerType) (*Stickers, error) {
return client.GetStickers(c.Id, limit, query, stickerType)
}
// GetStoryAlbumStories Returns the list of stories added to the given story album. For optimal performance, the number of returned stories is chosen by TDLib
// It is a helper method for Client.GetStoryAlbumStories
func (c *Chat) GetStoryAlbumStories(client *Client, limit int32, offset int32, storyAlbumId int32) (*Stories, error) {
return client.GetStoryAlbumStories(c.Id, limit, offset, storyAlbumId)
}
// GetStoryStatistics Returns detailed statistics about a story. Can be used only if story.can_get_statistics == true
// It is a helper method for Client.GetStoryStatistics
func (c *Chat) GetStoryStatistics(client *Client, storyId int32, opts *GetStoryStatisticsOpts) (*StoryStatistics, error) {
return client.GetStoryStatistics(c.Id, storyId, opts)
}
// GetUserBoosts Returns the list of boosts applied to a chat by a given user; requires administrator rights in the chat; for bots only
// It is a helper method for Client.GetUserChatBoosts
func (c *Chat) GetUserBoosts(client *Client, userId int64) (*FoundChatBoosts, error) {
return client.GetUserChatBoosts(c.Id, userId)
}
// GetVideoAvailableParticipants Returns the list of participant identifiers, on whose behalf a video chat in the chat can be joined
// It is a helper method for Client.GetVideoChatAvailableParticipants
func (c *Chat) GetVideoAvailableParticipants(client *Client) (*MessageSenders, error) {
return client.GetVideoChatAvailableParticipants(c.Id)
}
// GetVideoRtmpUrl Returns RTMP URL for streaming to the video chat of a chat; requires can_manage_video_chats administrator right
// It is a helper method for Client.GetVideoChatRtmpUrl
func (c *Chat) GetVideoRtmpUrl(client *Client) (*RtmpUrl, error) {
return client.GetVideoChatRtmpUrl(c.Id)
}
// GetVideoMessageAdvertisements Returns advertisements to be shown while a video from a message is watched. Available only if messageProperties.can_get_video_advertisements
// It is a helper method for Client.GetVideoMessageAdvertisements
func (c *Chat) GetVideoMessageAdvertisements(client *Client, messageId int64) (*VideoMessageAdvertisements, error) {
return client.GetVideoMessageAdvertisements(c.Id, messageId)
}
// GetWebAppLinkUrl Returns an HTTPS URL of a Web App to open after a link of the type internalLinkTypeWebApp is clicked
// It is a helper method for Client.GetWebAppLinkUrl
func (c *Chat) GetWebAppLinkUrl(client *Client, botUserId int64, parameters *WebAppOpenParameters, startParameter string, webAppShortName string, opts *GetWebAppLinkUrlOpts) (*WebAppUrl, error) {
return client.GetWebAppLinkUrl(botUserId, c.Id, parameters, startParameter, webAppShortName, opts)
}
// ImportMessages Imports messages exported from another application
// It is a helper method for Client.ImportMessages
func (c *Chat) ImportMessages(client *Client, attachedFiles []InputFile, messageFile InputFile) error {
return client.ImportMessages(attachedFiles, c.Id, messageFile)
}
// Join Adds the current user as a new member to a chat. Private and secret chats can't be joined using this method
// It is a helper method for Client.JoinChat
func (c *Chat) Join(client *Client) (ChatJoinResult, error) {
return client.JoinChat(c.Id)
}
// Leave Removes the current user from chat members. Private and secret chats can't be left using this method
// It is a helper method for Client.LeaveChat
func (c *Chat) Leave(client *Client) error {
return client.LeaveChat(c.Id)
}
// LoadDirectMessagesTopics Loads more topics in a channel direct messages chat administered by the current user. The loaded topics will be sent through updateDirectMessagesChatTopic.
// It is a helper method for Client.LoadDirectMessagesChatTopics
func (c *Chat) LoadDirectMessagesTopics(client *Client, limit int32) error {
return client.LoadDirectMessagesChatTopics(c.Id, limit)
}
// MarkChecklistTasksAsDone Adds tasks of a checklist in a message as done or not done
// It is a helper method for Client.MarkChecklistTasksAsDone
func (c *Chat) MarkChecklistTasksAsDone(client *Client, markedAsDoneTaskIds []int32, markedAsNotDoneTaskIds []int32, messageId int64) error {
return client.MarkChecklistTasksAsDone(c.Id, markedAsDoneTaskIds, markedAsNotDoneTaskIds, messageId)
}
// Open Informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats)
// It is a helper method for Client.OpenChat
func (c *Chat) Open(client *Client) error {
return client.OpenChat(c.Id)
}
// OpenSimilarChat Informs TDLib that a chat was opened from the list of similar chats. The method is independent of openChat and closeChat methods
// It is a helper method for Client.OpenChatSimilarChat
func (c *Chat) OpenSimilarChat(client *Client, openedChatId int64) error {
return client.OpenChatSimilarChat(c.Id, openedChatId)
}
// OpenMessageContent Informs TDLib that the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message).
// It is a helper method for Client.OpenMessageContent
func (c *Chat) OpenMessageContent(client *Client, messageId int64) error {
return client.OpenMessageContent(c.Id, messageId)
}
// OpenWebApp Informs TDLib that a Web App is being opened from the attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button.
// It is a helper method for Client.OpenWebApp
func (c *Chat) OpenWebApp(client *Client, botUserId int64, parameters *WebAppOpenParameters, url string, opts *OpenWebAppOpts) (*WebAppInfo, error) {
return client.OpenWebApp(botUserId, c.Id, parameters, url, opts)
}
// PinMessage Pins a message in a chat. A message can be pinned only if messageProperties.can_be_pinned
// It is a helper method for Client.PinChatMessage
func (c *Chat) PinMessage(client *Client, messageId int64, opts *PinChatMessageOpts) error {
return client.PinChatMessage(c.Id, messageId, opts)
}
// PostStory Posts a new story on behalf of a chat; requires can_post_stories administrator right for supergroup and channel chats. Returns a temporary story
// It is a helper method for Client.PostStory
func (c *Chat) PostStory(client *Client, activePeriod int32, albumIds []int32, content InputStoryContent, privacySettings StoryPrivacySettings, opts *PostStoryOpts) (*Story, error) {
return client.PostStory(activePeriod, albumIds, c.Id, content, privacySettings, opts)
}
// ProcessHasProtectedContentDisableRequest Processes request to disable has_protected_content in a chat
// It is a helper method for Client.ProcessChatHasProtectedContentDisableRequest
func (c *Chat) ProcessHasProtectedContentDisableRequest(client *Client, requestMessageId int64, opts *ProcessChatHasProtectedContentDisableRequestOpts) error {
return client.ProcessChatHasProtectedContentDisableRequest(c.Id, requestMessageId, opts)
}
// ProcessJoinRequest Handles a pending join request in a chat
// It is a helper method for Client.ProcessChatJoinRequest
func (c *Chat) ProcessJoinRequest(client *Client, userId int64, opts *ProcessChatJoinRequestOpts) error {
return client.ProcessChatJoinRequest(c.Id, userId, opts)
}
// ProcessJoinRequests Handles all pending join requests for a given link in a chat
// It is a helper method for Client.ProcessChatJoinRequests
func (c *Chat) ProcessJoinRequests(client *Client, inviteLink string, opts *ProcessChatJoinRequestsOpts) error {
return client.ProcessChatJoinRequests(c.Id, inviteLink, opts)
}
// RateSpeechRecognition Rates recognized speech in a video note or a voice note message
// It is a helper method for Client.RateSpeechRecognition
func (c *Chat) RateSpeechRecognition(client *Client, messageId int64, opts *RateSpeechRecognitionOpts) error {
return client.RateSpeechRecognition(c.Id, messageId, opts)
}
// ReadAllMentions Marks all mentions in a chat as read
// It is a helper method for Client.ReadAllChatMentions
func (c *Chat) ReadAllMentions(client *Client) error {
return client.ReadAllChatMentions(c.Id)
}
// ReadAllPollVotes Marks all poll votes in a chat as read
// It is a helper method for Client.ReadAllChatPollVotes
func (c *Chat) ReadAllPollVotes(client *Client) error {
return client.ReadAllChatPollVotes(c.Id)
}
// ReadAllReactions Marks all reactions in a chat as read
// It is a helper method for Client.ReadAllChatReactions
func (c *Chat) ReadAllReactions(client *Client) error {
return client.ReadAllChatReactions(c.Id)
}
// ReadAllDirectMessagesTopicReactions Removes all unread reactions in the topic in a channel direct messages chat administered by the current user
// It is a helper method for Client.ReadAllDirectMessagesChatTopicReactions
func (c *Chat) ReadAllDirectMessagesTopicReactions(client *Client, topicId int64) error {
return client.ReadAllDirectMessagesChatTopicReactions(c.Id, topicId)
}