-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathboosts.go
50 lines (39 loc) · 1.37 KB
/
boosts.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
package telebot
import "fmt"
// BoostUpdated represents a boost added to a chat or changed.
// <a href="https://core.telegram.org/bots/api#chatboostupdated">/bots/api#chatboostupdated</a>
type BoostUpdated struct {
// Chat is the chat which was boosted.
Chat Chat `json:"chat"`
// Boost is the information about the chat boost.
Boost ChatBoost `json:"boost"`
}
// ReflectType returns the type of the struct.
func (b *BoostUpdated) ReflectType() string {
return fmt.Sprintf("%T", b)
}
// Type returns the type of the struct.
func (b *BoostUpdated) Type() string {
return "BoostUpdated"
}
// BoostRemoved represents a boost removed from a chat.
// <a href="https://core.telegram.org/bots/api#chatboostremoved">/bots/api#chatboostremoved</a>
type BoostRemoved struct {
// Chat is the chat which was boosted.
Chat Chat `json:"chat"`
// BoostID is the unique identifier of the boost.
BoostID string `json:"boost_id"`
// RemoveDate is the point in time (Unix timestamp) when the boost was removed.
// todo: #6: change to time.Time
RemoveDate int64 `json:"remove_date"`
// Source is the source of the removed boost.
Source ChatBoostSource `json:"source"`
}
// ReflectType returns the type of the struct.
func (c *BoostRemoved) ReflectType() string {
return fmt.Sprintf("%T", c)
}
// Type returns the type of the struct.
func (c *BoostRemoved) Type() string {
return "BoostRemoved"
}