all repos — telegram-bot-api @ 50bcf10f7e611e05a1d8388d026404783ec5722f

Golang bindings for the Telegram Bot API

Update sendDice helpers.
Syfaro syfaro@huefox.com
Tue, 21 Jul 2020 14:04:01 -0500
commit

50bcf10f7e611e05a1d8388d026404783ec5722f

parent

1059fc759ddd50b5380daa671bd34544302fd62d

1 files changed, 19 insertions(+), 1 deletions(-)

jump to
M helpers.gohelpers.go

@@ -916,12 +916,30 @@ }

} // NewSendDice allows you to send a random dice roll. +// +// Deprecated: Use NewDice instead. func NewSendDice(chatID int64) DiceConfig { + return NewDice(chatID) +} + +// NewDice allows you to send a random dice roll. +func NewDice(chatID int64) DiceConfig { return DiceConfig{ BaseChat: BaseChat{ ChatID: chatID, }, - Emoji: "", + } +} + +// NewDiceWithEmoji allows you to send a random roll of one of many types. +// +// Emoji may be 🎲 (1-6), 🎯 (1-6), or 🏀 (1-5). +func NewDiceWithEmoji(chatID int64, emoji string) DiceConfig { + return DiceConfig{ + BaseChat: BaseChat{ + ChatID: chatID, + }, + Emoji: emoji, } }