|
@@ -2236,6 +2236,23 @@ func (s *Session) WebhookExecute(webhookID, token string, wait bool, data *Webho
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+// WebhookMessage gets a webhook message.
|
|
|
+// webhookID : The ID of a webhook
|
|
|
+// token : The auth token for the webhook
|
|
|
+// messageID : The ID of message to get
|
|
|
+func (s *Session) WebhookMessage(webhookID, token, messageID string) (message *Message, err error) {
|
|
|
+ uri := EndpointWebhookMessage(webhookID, token, messageID)
|
|
|
+
|
|
|
+ body, err := s.RequestWithBucketID("GET", uri, nil, EndpointWebhookToken("", ""))
|
|
|
+ if err != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ err = json.Unmarshal(body, &message)
|
|
|
+
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
// WebhookMessageEdit edits a webhook message.
|
|
|
// webhookID : The ID of a webhook
|
|
|
// token : The auth token for the webhook
|
|
@@ -2557,6 +2574,13 @@ func (s *Session) InteractionRespond(interaction *Interaction, resp *Interaction
|
|
|
return err
|
|
|
}
|
|
|
|
|
|
+// InteractionResponse gets the response to an interaction.
|
|
|
+// appID : The application ID.
|
|
|
+// interaction : Interaction instance.
|
|
|
+func (s *Session) InteractionResponse(appID string, interaction *Interaction) (*Message, error) {
|
|
|
+ return s.WebhookMessage(appID, interaction.Token, "@original")
|
|
|
+}
|
|
|
+
|
|
|
// InteractionResponseEdit edits the response to an interaction.
|
|
|
// appID : The application ID.
|
|
|
// interaction : Interaction instance.
|