From a1334c45f41f635838cf86c96f3ffba052fe8142 Mon Sep 17 00:00:00 2001 From: diamondburned Date: Sun, 21 Aug 2022 00:58:57 -0700 Subject: [PATCH] api: Revert "Revert 'Add FollowUpInteraction'" This reverts commit 96b8e2b8e5fa49953ec46390895ed0deeee43678. The commit that is being reverted was created on the wrong commit. --- api/interaction.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/interaction.go b/api/interaction.go index a4ced0f..6ccd0ff 100644 --- a/api/interaction.go +++ b/api/interaction.go @@ -256,9 +256,18 @@ func (c *Client) DeleteInteractionResponse(appID discord.AppID, token string) er } // CreateInteractionFollowup creates a followup message for an interaction. +// +// Deprecated: use FollowUpInteraction instead. func (c *Client) CreateInteractionFollowup( appID discord.AppID, token string, data InteractionResponseData) (*discord.Message, error) { + return c.FollowUpInteraction(appID, token, data) +} + +// FollowUpInteraction creates a followup message for an interaction. +func (c *Client) FollowUpInteraction( + appID discord.AppID, token string, data InteractionResponseData) (*discord.Message, error) { + if (data.Content == nil || data.Content.Val == "") && (data.Embeds == nil || len(*data.Embeds) == 0) && len(data.Files) == 0 { return nil, ErrEmptyMessage