From d2f35075e35f7ff0ca92a4fca7a8f07b3d139f90 Mon Sep 17 00:00:00 2001 From: Bohdan Horbeshko Date: Sat, 5 Feb 2022 10:46:24 -0500 Subject: Support dice messages --- telegram/utils.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/telegram/utils.go b/telegram/utils.go index 00bf93f..910bfd6 100644 --- a/telegram/utils.go +++ b/telegram/utils.go @@ -486,6 +486,9 @@ func (c *Client) messageToText(message *client.Message) string { contact.Contact.Vcard, jid, ) + case client.TypeMessageDice: + dice, _ := message.Content.(*client.MessageDice) + return fmt.Sprintf("%s 1d6: [%v]", dice.Emoji, dice.Value) } return fmt.Sprintf("unknown message (%s)", message.Content.MessageContentType()) -- cgit v1.2.3