Skip to content

Add file type filtering in slash command attachment options and modal attachment uploads - #268

Merged
freya022 merged 6 commits into
3.Xfrom
feature/interaction-file-types-V3
Sep 8, 2026
Merged

freya022 merged 6 commits into
3.Xfrom
feature/interaction-file-types-V3

Conversation

@freya022

@freya022 freya022 commented Jun 27, 2026

Copy link
Copy Markdown
Owner

This PR enables slash commands options to accept attachments with specific extensions or media type (image, video, audio ; the list of extensions implied by these is not documented on purpose). A property on the jda-ktx AttachmentUpload builder has also been added.

Depends on discord-jda/JDA#3113.

New features

  • Added @FileTypes, accepts extensions and/or switches for certain media types
  • Added a fileTypes property to declarative slash command option builders, example:
    • fileTypes += "json"
    • fileTypes += FileType.IMAGE
  • Added a fileTypes property to the AttachmentUpload DSL, it is used the same as with slash commands

@freya022
freya022 force-pushed the feature/interaction-file-types-V3 branch from 510aa99 to 1241eac Compare September 7, 2026 15:35
@freya022
freya022 merged commit 8a33812 into 3.X Sep 8, 2026
1 check passed
@freya022
freya022 deleted the feature/interaction-file-types-V3 branch September 8, 2026 08:40
freya022 added a commit that referenced this pull request Sep 15, 2026
… attachment uploads (#268)

(cherry picked from commit 8a33812)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant