Skip to content

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

Open
freya022 wants to merge 6 commits into
3.Xfrom
feature/interaction-file-types-V3
Open

Add file type filtering in slash command attachment options and modal attachment uploads#268
freya022 wants to merge 6 commits into
3.Xfrom
feature/interaction-file-types-V3

Conversation

@freya022

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.

This feature is locked until it is released. However, I've found that setting those early does not cause issues, meaning you should be able to adapt your bots then immediately benefit from the feature when it gets released.

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

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