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 #5

Merged
merged 16 commits into from
Jan 24, 2025

Conversation

Droid00000
Copy link
Owner

Summary

Adds support for sending files (attachments) in interaction responses and closes out shardlab#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

@Droid00000 Droid00000 merged commit 8937456 into response-attachments 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