Closed No3371 closed 2 years ago
Thanks for using Disgo in its Beta release. Your help is appreciated in bringing us closer to a production-ready release.
The issue with disgo.CreateInteractionResponse
was related to usage of the wrong HTTP method. This has been fixed accordingly. Please note that requests which use multipart/form-data
are not supported at this time (stated in https://github.com/switchupcb/disgo/releases/tag/v0.10.0). This may or may not be applicable to your use-case according to https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response. In any case, you should be able to use CreateInteractionResponse
without files.
In addition to the above, an example for slash commands (interaction responses) is almost completed. Full support for the CreateInteractionResponse
will be confirmed upon it's release (or #19; whichever comes first).
The main issue regarding tricky pointers is related to a dasgo
field declaration. Issues such as these can be fixed by making a pull request on the Dasgo repository. A pull request and subsequent commit has already been completed for this issue.
However, feel free to request this issue to be re-opened (with a focus on CreateInteractionResponse
) if further issues occur unexpectedly.
If you could not send any content in your messages, this was due to the CreateMessage
using a multipart/form
content type without the payload_json
provided (in anticipation of support for files). Support for files has been added to Disgo in https://github.com/switchupcb/disgo/commit/b2d7844f67af28b216e4e4842387f4ff33785e36. An example has been provided at _examples/message/send.
The dasgo.CreateInteractionResponse
structure was missing a field for the HTTP information that contained information about the response. Thus, only an empty message was sent. This occurred due to the documentation implicitly missing interaction fields. These fields have been added to dasgo.go
. Based on the Slash Command Example in https://github.com/switchupcb/disgo/pull/38, interactions are working as expected now. However, you may want to wait until this is merged and released in disgo v0.10.1
(which precedes disgo v10
STABLE).
I will send you a a small reward as courtesy of your time spent testing during disgo v0.10.0
BETA. If you are interested, let me know and I will email your connected email to GitHub (@No3371).
The examples have been merged: https://github.com/switchupcb/disgo/tree/v10/_examples/command.
https://stackoverflow.com/questions/44370277/type-is-pointer-to-interface-not-interface-confusion
(BTW, I failed to find a way to properly respond to interaction. By newing
disgo.CreateInteractionResponse
I can send an empty response and that's all.)