-
-
Notifications
You must be signed in to change notification settings - Fork 131
/
dice.go
89 lines (73 loc) · 2.26 KB
/
dice.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
package message
import (
"context"
"github.com/gotd/td/tg"
)
// MediaDice adds a dice-based animated sticker.
func MediaDice(emoticon string) MediaOption {
return Media(&tg.InputMediaDice{
Emoticon: emoticon,
})
}
const (
// DiceEmoticon is an emoticon to send dice sticker.
DiceEmoticon = "🎲"
// DartsEmoticon is an emoticon to send darts sticker.
DartsEmoticon = "🎯"
// BasketballEmoticon is an emoticon to send basketball sticker.
BasketballEmoticon = "🏀"
// FootballEmoticon is an emoticon to send football sticker.
FootballEmoticon = "⚽"
// CasinoEmoticon is an emoticon to send casino sticker.
CasinoEmoticon = "🎰"
// BowlingEmoticon is an emoticon to send bowling sticker.
BowlingEmoticon = "🎳"
)
// Dice adds a dice animated sticker.
func Dice() MediaOption {
return MediaDice(DiceEmoticon)
}
// Darts adds a darts animated sticker.
func Darts() MediaOption {
return MediaDice(DartsEmoticon)
}
// Basketball adds a basketball animated sticker.
func Basketball() MediaOption {
return MediaDice(BasketballEmoticon)
}
// Football adds a football animated sticker.
func Football() MediaOption {
return MediaDice(FootballEmoticon)
}
// Casino adds a casino animated sticker.
func Casino() MediaOption {
return MediaDice(CasinoEmoticon)
}
// Bowling adds a bowling animated sticker.
func Bowling() MediaOption {
return MediaDice(BowlingEmoticon)
}
// Dice sends a dice animated sticker.
func (b *Builder) Dice(ctx context.Context) (tg.UpdatesClass, error) {
return b.Media(ctx, Dice())
}
// Darts sends a darts animated sticker.
func (b *Builder) Darts(ctx context.Context) (tg.UpdatesClass, error) {
return b.Media(ctx, Darts())
}
// Basketball sends a basketball animated sticker.
func (b *Builder) Basketball(ctx context.Context) (tg.UpdatesClass, error) {
return b.Media(ctx, Basketball())
}
// Football sends a football animated sticker.
func (b *Builder) Football(ctx context.Context) (tg.UpdatesClass, error) {
return b.Media(ctx, Football())
}
// Casino sends a casino animated sticker.
func (b *Builder) Casino(ctx context.Context) (tg.UpdatesClass, error) {
return b.Media(ctx, Casino())
}
// Bowling sends a bowling animated sticker.
func (b *Builder) Bowling(ctx context.Context) (tg.UpdatesClass, error) {
return b.Media(ctx, Bowling())
}