mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-07 12:38:05 +00:00
API: Add CrosspostMessage method
This commit is contained in:
parent
9925461a25
commit
37d285184a
|
@ -370,6 +370,19 @@ func (c *Client) EditMessageComplex(
|
|||
)
|
||||
}
|
||||
|
||||
// CrosspostMessage crossposts a message in a news channel to following channels.
|
||||
// This endpoint requires the SEND_MESSAGES permission if the current user sent the message,
|
||||
// or additionally the MANAGE_MESSAGES permission for all other messages.
|
||||
func (c *Client) CrosspostMessage(channelID discord.ChannelID, messageID discord.MessageID) (*discord.Message, error) {
|
||||
var msg *discord.Message
|
||||
|
||||
return msg, c.RequestJSON(
|
||||
&msg,
|
||||
"POST",
|
||||
EndpointChannels+channelID.String()+"/messages/"+messageID.String()+"/crosspost",
|
||||
)
|
||||
}
|
||||
|
||||
// DeleteMessage delete a message. If operating on a guild channel and trying
|
||||
// to delete a message that was not sent by the current user, this endpoint
|
||||
// requires the MANAGE_MESSAGES permission.
|
||||
|
|
Loading…
Reference in a new issue