andersfylling / disgord

Go module for interacting with the documented Discord's bot interface; Gateway, REST requests and voice
BSD 3-Clause "New" or "Revised" License
502 stars 71 forks source link

fix: Updated type for `session.EditInteractionResponse` #497

Closed Cufee closed 2 years ago

Cufee commented 2 years ago

Updated type for session.EditInteractionResponsefrom Message to UpdateMessage, removed deprecated type definition

Description

https://github.com/andersfylling/disgord/issues/496

closes #496

Breaking Change?

yes

Benchmarks

N/A

Checklist:

Cufee commented 2 years ago

It looks like this code does update the content of a message, but not the file. I was able to run this locally with my bot instance without any errors, however, it seems that I am missing something critical here as the new file is not added to the interaction.

Docs referenced: https://discord.com/developers/docs/reference#uploading-files

Cufee commented 2 years ago

Found the mistake, I was missing a call to prepare the PATCH request payload and content type. Seems to be working now.