Add set message reaction helpers.

This commit is contained in:
Ilja Lapkovskis 2024-01-20 18:17:17 +02:00
parent e41be9f718
commit a304e9002d
No known key found for this signature in database
GPG key ID: 53D2AA4F0D1079C4
3 changed files with 76 additions and 1 deletions

12
bot.go
View file

@ -746,3 +746,15 @@ func EscapeText(parseMode string, text string) string {
return replacer.Replace(text)
}
func (bot *BotAPI) SendReaction(config SetMessageReactionConfig) (Message, error) {
resp, err := bot.Request(config)
if err != nil {
return Message{}, err
}
var message Message
err = json.Unmarshal(resp.Result, &message)
return message, err
}