Add ability to reply with embeds (#1160)
* Add ability to reply with embeds * Fix typo in method comment
This commit is contained in:
parent
fa14e19ad5
commit
e455362760
1 changed files with 22 additions and 0 deletions
22
restapi.go
22
restapi.go
|
@ -1729,6 +1729,28 @@ func (s *Session) ChannelMessageSendReply(channelID string, content string, refe
|
|||
})
|
||||
}
|
||||
|
||||
// ChannelMessageSendEmbedReply sends a message to the given channel with reference data and embedded data.
|
||||
// channelID : The ID of a Channel.
|
||||
// embed : The embed data to send.
|
||||
// reference : The message reference to send.
|
||||
func (s *Session) ChannelMessageSendEmbedReply(channelID string, embed *MessageEmbed, reference *MessageReference) (*Message, error) {
|
||||
return s.ChannelMessageSendEmbedsReply(channelID, []*MessageEmbed{embed}, reference)
|
||||
}
|
||||
|
||||
// ChannelMessageSendEmbedsReply sends a message to the given channel with reference data and multiple embedded data.
|
||||
// channelID : The ID of a Channel.
|
||||
// embeds : The embeds data to send.
|
||||
// reference : The message reference to send.
|
||||
func (s *Session) ChannelMessageSendEmbedsReply(channelID string, embeds []*MessageEmbed, reference *MessageReference) (*Message, error) {
|
||||
if reference == nil {
|
||||
return nil, fmt.Errorf("reply attempted with nil message reference")
|
||||
}
|
||||
return s.ChannelMessageSendComplex(channelID, &MessageSend{
|
||||
Embeds: embeds,
|
||||
Reference: reference,
|
||||
})
|
||||
}
|
||||
|
||||
// ChannelMessageEdit edits an existing message, replacing it entirely with
|
||||
// the given content.
|
||||
// channelID : The ID of a Channel
|
||||
|
|
Loading…
Reference in a new issue