bwmarrin / discordgo

(Golang) Go bindings for Discord
BSD 3-Clause "New" or "Revised" License
5.12k stars 816 forks source link

Add InteractionCallbackResponse #1584

Open elliotwms opened 1 month ago

elliotwms commented 1 month ago

The interaction callback endpoint returns an interaction callback response as described in the docs: https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-response-object

This PR adds the structs, and updates the InteractionCallback func to return them

elliotwms commented 1 month ago

Just checked the actual Discord API behaviour for both InteractionResponseDeferredChannelMessageWithSource and InteractionResponseChannelMessageWithSource, and it's a 204 No Content in both cases.

This response body may be returned on other types but I've not been able to test it. If that's the case then there's less utility in this change than I first thought

elliotwms commented 1 month ago

I don't currently have a use for this, and am not able to test it, so I'll leave the PR here in case someone would like to pick it up