dice: clean up the code

pull/269/head
dande 4 years ago
parent 9268c6dff7
commit 5b2a3804b5

@ -353,15 +353,19 @@ func (p *Poll) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, error) {
return extractMessage(data)
}
// Send delivers dice through bot b to recipient
func (d *Dice) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, error) {
params := map[string]string{
"chat_id": to.Recipient(),
"emoji": string(d.Type),
}
embedSendOptions(params, opt)
data, err := b.Raw("sendDice", params)
if err != nil {
return nil, err
}
return extractMessage(data)
}

Loading…
Cancel
Save