Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: attachments in interaction responses #296

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Droid00000
Copy link
Contributor

Summary

Adds support for sending files (attachments) in interaction responses and closes out #227.

Added

attachments KWARG to interaction response methods.

Changed

Something akin to this for most interaction response/webhook API calls.

 body = if attachments
          files = [*0...attachments.size].zip(attachments).to_h
          { **files, payload_json: { type: type, data: body }.to_json }
        else
          { type: type, data: body }.to_json
        end

* Attatchments in interaction responses

* Minor fix

* Debug

* Another attempt?

* Again

* An attempt

* Minor fix

* M

* Bugfix

* M

* Cleanup

* Cleanup

* Cleanup

* Cleanup

* fix typos

* Remove unpacking operand.
@Droid00000 Droid00000 changed the title attachments in interaction responses feat: attachments in interaction responses Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant