Add set message reaction helpers.
This commit is contained in:
parent
e41be9f718
commit
a304e9002d
3 changed files with 76 additions and 1 deletions
12
bot.go
12
bot.go
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue