-
Notifications
You must be signed in to change notification settings - Fork 0
/
methods_message.go
86 lines (75 loc) · 2.33 KB
/
methods_message.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
package telegram
// THIS FILE IS GENERATED AUTOMATICALLY. DO NOT CHANGE IT
import "context"
// https://core.telegram.org/bots/api#sendmessage
func (b *bot) SendMessage(ctx context.Context, m *TextMessage) (*Message, error) {
var v *Message
if err := b.do(ctx, "sendMessage", m, &v); err != nil {
return nil, err
}
return v, nil
}
// https://core.telegram.org/bots/api#forwardmessage
func (b *bot) ForwardMessage(ctx context.Context, m *ForwardedMessage) (*Message, error) {
var v *Message
if err := b.do(ctx, "forwardMessage", m, &v); err != nil {
return nil, err
}
return v, nil
}
// https://core.telegram.org/bots/api#sendphoto
func (b *bot) SendPhoto(ctx context.Context, m *PhotoMessage) (*Message, error) {
var v *Message
if err := b.do(ctx, "sendPhoto", m, &v); err != nil {
return nil, err
}
return v, nil
}
// https://core.telegram.org/bots/api#sendaudio
func (b *bot) SendAudio(ctx context.Context, m *AudioMessage) (*Message, error) {
var v *Message
if err := b.do(ctx, "sendAudio", m, &v); err != nil {
return nil, err
}
return v, nil
}
// https://core.telegram.org/bots/api#senddocument
func (b *bot) SendDocument(ctx context.Context, m *DocumentMessage) (*Message, error) {
var v *Message
if err := b.do(ctx, "sendDocument", m, &v); err != nil {
return nil, err
}
return v, nil
}
// https://core.telegram.org/bots/api#sendsticker
func (b *bot) SendSticker(ctx context.Context, m *StickerMessage) (*Message, error) {
var v *Message
if err := b.do(ctx, "sendSticker", m, &v); err != nil {
return nil, err
}
return v, nil
}
// https://core.telegram.org/bots/api#editmessagetext
func (b *bot) EditMessageText(ctx context.Context, m *MessageText) (*Message, error) {
var v *Message
if err := b.do(ctx, "editMessageText", m, &v); err != nil {
return nil, err
}
return v, nil
}
// https://core.telegram.org/bots/api#editmessagecaption
func (b *bot) EditMessageCaption(ctx context.Context, m *MessageCaption) (*Message, error) {
var v *Message
if err := b.do(ctx, "editMessageCaption", m, &v); err != nil {
return nil, err
}
return v, nil
}
// https://core.telegram.org/bots/api#editmessagereplymarkup
func (b *bot) EditMessageReplyMarkup(ctx context.Context, m *MessageReplyMarkup) (*Message, error) {
var v *Message
if err := b.do(ctx, "editMessageReplyMarkup", m, &v); err != nil {
return nil, err
}
return v, nil
}