forked from pothtonswer/discordmuffin
MessageReactionsRemoveAll (#414)
This commit is contained in:
parent
013faa1da4
commit
faa8ececc0
2 changed files with 14 additions and 1 deletions
|
@ -108,6 +108,9 @@ var (
|
||||||
EndpointWebhook = func(wID string) string { return EndpointWebhooks + wID }
|
EndpointWebhook = func(wID string) string { return EndpointWebhooks + wID }
|
||||||
EndpointWebhookToken = func(wID, token string) string { return EndpointWebhooks + wID + "/" + token }
|
EndpointWebhookToken = func(wID, token string) string { return EndpointWebhooks + wID + "/" + token }
|
||||||
|
|
||||||
|
EndpointMessageReactionsAll = func(cID, mID string) string {
|
||||||
|
return EndpointChannelMessage(cID, mID) + "/reactions"
|
||||||
|
}
|
||||||
EndpointMessageReactions = func(cID, mID, eID string) string {
|
EndpointMessageReactions = func(cID, mID, eID string) string {
|
||||||
return EndpointChannelMessage(cID, mID) + "/reactions/" + eID
|
return EndpointChannelMessage(cID, mID) + "/reactions/" + eID
|
||||||
}
|
}
|
||||||
|
|
12
restapi.go
12
restapi.go
|
@ -767,7 +767,7 @@ func (s *Session) GuildMemberDelete(guildID, userID string) (err error) {
|
||||||
return s.GuildMemberDeleteWithReason(guildID, userID, "")
|
return s.GuildMemberDeleteWithReason(guildID, userID, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
// GuildMemberDelete removes the given user from the given guild.
|
// GuildMemberDeleteWithReason removes the given user from the given guild.
|
||||||
// guildID : The ID of a Guild.
|
// guildID : The ID of a Guild.
|
||||||
// userID : The ID of a User
|
// userID : The ID of a User
|
||||||
// reason : The reason for the kick
|
// reason : The reason for the kick
|
||||||
|
@ -1928,6 +1928,16 @@ func (s *Session) MessageReactionRemove(channelID, messageID, emojiID, userID st
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MessageReactionsRemoveAll deletes all reactions from a message
|
||||||
|
// channelID : The channel ID
|
||||||
|
// messageID : The message ID.
|
||||||
|
func (s *Session) MessageReactionsRemoveAll(channelID, messageID string) error {
|
||||||
|
|
||||||
|
_, err := s.RequestWithBucketID("DELETE", EndpointMessageReactionsAll(channelID, messageID), nil, EndpointMessageReactionsAll(channelID, messageID))
|
||||||
|
|
||||||
|
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