Add MessageReactionsRemoveEmoji (#873)
* Add MessageReactionsRemove * Add MessageReactionsRemove * Rename MessageReactionsRemove to MessageReactionsRemoveEmoji Co-authored-by: Qais Patankar <qaisjp@gmail.com> * Update MessageReactionsRemoveEmoji comments Co-authored-by: Qais Patankar <qaisjp@gmail.com>
This commit is contained in:
parent
5f6bb2d120
commit
b6deecb67d
1 changed files with 13 additions and 0 deletions
13
restapi.go
13
restapi.go
|
@ -2209,6 +2209,19 @@ func (s *Session) MessageReactionsRemoveAll(channelID, messageID string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MessageReactionsRemoveEmoji deletes all reactions of a certain emoji from a message
|
||||||
|
// channelID : The channel ID
|
||||||
|
// messageID : The message ID
|
||||||
|
// emojiID : The emoji ID
|
||||||
|
func (s *Session) MessageReactionsRemoveEmoji(channelID, messageID, emojiID string) error {
|
||||||
|
|
||||||
|
// emoji such as #⃣ need to have # escaped
|
||||||
|
emojiID = strings.Replace(emojiID, "#", "%23", -1)
|
||||||
|
_, err := s.RequestWithBucketID("DELETE", EndpointMessageReactions(channelID, messageID, emojiID), nil, EndpointMessageReactions(channelID, messageID, emojiID))
|
||||||
|
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
// MessageReactions gets all the users reactions for a specific emoji.
|
// MessageReactions gets all the users reactions for a specific emoji.
|
||||||
// channelID : The channel ID.
|
// channelID : The channel ID.
|
||||||
// messageID : The message ID.
|
// messageID : The message ID.
|
||||||
|
|
Loading…
Reference in a new issue