-
Notifications
You must be signed in to change notification settings - Fork 525
Expand file tree
/
Copy pathapi.go
More file actions
130 lines (127 loc) · 6.62 KB
/
Copy pathapi.go
File metadata and controls
130 lines (127 loc) · 6.62 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
package telebot
import "io"
// API is the interface that wraps all basic methods for interacting
// with Telegram Bot API.
type API interface {
Raw(method string, payload interface{}) ([]byte, error)
Accept(query *PreCheckoutQuery, errorMessage ...string) error
AddStickerToSet(of Recipient, name string, sticker InputSticker) error
AdminsOf(chat *Chat) ([]ChatMember, error)
Answer(query *Query, resp *QueryResponse) error
AnswerGuest(msg *Message, result Result) (*SentGuestMessage, error)
AnswerWebApp(query *Query, r Result) (*WebAppMessage, error)
ApproveJoinRequest(chat Recipient, user *User) error
Ban(chat *Chat, member *ChatMember, revokeMessages ...bool) error
BanSenderChat(chat *Chat, sender Recipient) error
BusinessConnection(id string) (*BusinessConnection, error)
ChatByID(id int64) (*Chat, error)
ChatByUsername(name string) (*Chat, error)
ChatFullInfo(chat Recipient) (*ChatFullInfo, error)
ChatMemberOf(chat, user Recipient) (*ChatMember, error)
Close() (bool, error)
CloseGeneralTopic(chat *Chat) error
CloseTopic(chat *Chat, topic *Topic) error
Commands(opts ...interface{}) ([]Command, error)
Copy(to Recipient, msg Editable, opts ...interface{}) (*Message, error)
CopyMany(to Recipient, msgs []Editable, opts ...*SendOptions) ([]Message, error)
CreateInviteLink(chat Recipient, link *ChatInviteLink) (*ChatInviteLink, error)
CreateInvoiceLink(i Invoice) (string, error)
CreateStickerSet(of Recipient, set *StickerSet) error
CreateTopic(chat *Chat, topic *Topic) (*Topic, error)
CustomEmojiStickers(ids []string) ([]Sticker, error)
DeclineJoinRequest(chat Recipient, user *User) error
DefaultRights(forChannels bool) (*Rights, error)
Delete(msg Editable) error
DeleteCommands(opts ...interface{}) error
DeleteGroupPhoto(chat *Chat) error
DeleteGroupStickerSet(chat *Chat) error
DeleteMany(msgs []Editable) error
DeleteSticker(sticker string) error
DeleteStickerSet(name string) error
DeleteTopic(chat *Chat, topic *Topic) error
Download(file *File, localFilename string) error
Edit(msg Editable, what interface{}, opts ...interface{}) (*Message, error)
EditCaption(msg Editable, caption string, opts ...interface{}) (*Message, error)
EditGeneralTopic(chat *Chat, topic *Topic) error
EditInviteLink(chat Recipient, link *ChatInviteLink) (*ChatInviteLink, error)
EditMedia(msg Editable, media Inputtable, opts ...interface{}) (*Message, error)
EditReplyMarkup(msg Editable, markup *ReplyMarkup) (*Message, error)
EditTopic(chat *Chat, topic *Topic) error
File(file *File) (io.ReadCloser, error)
FileByID(fileID string) (File, error)
Forward(to Recipient, msg Editable, opts ...interface{}) (*Message, error)
ForwardMany(to Recipient, msgs []Editable, opts ...*SendOptions) ([]Message, error)
GameScores(user Recipient, msg Editable) ([]GameHighScore, error)
GetAvailableGifts() ([]Gift, error)
HideGeneralTopic(chat *Chat) error
InviteLink(chat *Chat) (string, error)
Leave(chat Recipient) error
Len(chat *Chat) (int, error)
Logout() (bool, error)
MenuButton(chat *User) (*MenuButton, error)
MyDescription(language string) (*BotInfo, error)
MyName(language string) (*BotInfo, error)
MyShortDescription(language string) (*BotInfo, error)
Notify(to Recipient, action ChatAction, threadID ...int) error
Pin(msg Editable, opts ...interface{}) error
ProfileAudiosOf(user *User, offset, limit int) (*UserProfileAudios, error)
ProfilePhotosOf(user *User) ([]Photo, error)
Promote(chat *Chat, member *ChatMember) error
React(to Recipient, msg Editable, r Reactions) error
RefundStars(to Recipient, chargeID string) error
EditUserStarSubscription(user Recipient, chargeID string, isCanceled bool) error
RemoveMyProfilePhoto() error
RemoveWebhook(dropPending ...bool) error
ReopenGeneralTopic(chat *Chat) error
ReopenTopic(chat *Chat, topic *Topic) error
ReplaceStickerInSet(of Recipient, stickerSet, oldSticker string, sticker InputSticker) (bool, error)
Reply(to *Message, what interface{}, opts ...interface{}) (*Message, error)
Respond(c *Callback, resp ...*CallbackResponse) error
Restrict(chat *Chat, member *ChatMember) error
RevokeInviteLink(chat Recipient, link string) (*ChatInviteLink, error)
Send(to Recipient, what interface{}, opts ...interface{}) (*Message, error)
SendAlbum(to Recipient, a Album, opts ...interface{}) ([]Message, error)
SendDraft(to Recipient, draftID int, text string, opts ...interface{}) error
SendPaidMedia(to Recipient, stars int, a PaidAlbum, opts ...interface{}) (*Message, error)
SendGift(to Recipient, giftID string, opts ...interface{}) error
SavePreparedInlineMessage(user Recipient, result Result, opts ...interface{}) (*PreparedInlineMessage, error)
SetAdminTitle(chat *Chat, user *User, title string) error
SetMemberTag(chat *Chat, user *User, tag string) error
SetCommands(opts ...interface{}) error
SetCustomEmojiStickerSetThumb(name, id string) error
SetDefaultRights(rights Rights, forChannels bool) error
SetGameScore(user Recipient, msg Editable, score GameHighScore) (*Message, error)
SetGroupDescription(chat *Chat, description string) error
SetGroupPermissions(chat *Chat, perms Rights) error
SetGroupStickerSet(chat *Chat, setName string) error
SetGroupTitle(chat *Chat, title string) error
SetMenuButton(chat *User, mb interface{}) error
SetMyDescription(desc, language string) error
SetMyName(name, language string) error
SetMyProfilePhoto(photo InputProfilePhoto) error
SetMyShortDescription(desc, language string) error
SetStickerEmojis(sticker string, emojis []string) error
SetStickerKeywords(sticker string, keywords []string) error
SetStickerMaskPosition(sticker string, mask MaskPosition) error
SetStickerPosition(sticker string, position int) error
SetStickerSetThumb(of Recipient, set *StickerSet) error
SetStickerSetTitle(s StickerSet) error
SetUserEmojiStatus(user Recipient, emojiStatusCustomEmojiID string, expirationDate ...int64) error
SetWebhook(w *Webhook) error
Ship(query *ShippingQuery, what ...interface{}) error
StarTransactions(offset, limit int) ([]StarTransaction, error)
StickerSet(name string) (*StickerSet, error)
StopLiveLocation(msg Editable, opts ...interface{}) (*Message, error)
StopPoll(msg Editable, opts ...interface{}) (*Poll, error)
TopicIconStickers() ([]Sticker, error)
Unban(chat *Chat, user *User, forBanned ...bool) error
UnbanSenderChat(chat *Chat, sender Recipient) error
UnhideGeneralTopic(chat *Chat) error
Unpin(chat Recipient, messageID ...int) error
UnpinAll(chat Recipient) error
UnpinAllGeneralTopicMessages(chat *Chat) error
UnpinAllTopicMessages(chat *Chat, topic *Topic) error
UploadSticker(to Recipient, format StickerSetFormat, f File) (*File, error)
UserBoosts(chat, user Recipient) ([]Boost, error)
Webhook() (*Webhook, error)
}