Skip to content

Add file type filtering support for command options and file uploads - #3596

Merged
arqunis merged 4 commits into
serenity-rs:nextfrom
KiloOscarSix:next
Aug 8, 2026
Merged

Add file type filtering support for command options and file uploads#3596
arqunis merged 4 commits into
serenity-rs:nextfrom
KiloOscarSix:next

Conversation

@KiloOscarSix

Copy link
Copy Markdown
Contributor

https://docs.discord.com/developers/change-log#filter-file-types-in-file-uploads-and-attachment-options

Open Questions:

  1. I went with an array of strings to best mirror the docs, but an Enum of Image, Video, Audio, Extension(String) could be argued for.
  2. I'm not a fan of the:
Cow::Owned(
                file_types.into_owned().into_iter().map(|f| f.into_owned().into()).collect(),
            ),

but kinda ties into point one with how we want the api to look.

@github-actions github-actions Bot added model Related to the `model` module. builder Related to the `builder` module. labels Aug 5, 2026

@meditationmind meditationmind left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks fine to me. Could merge this as is, but I've noted a few docs nitpicks below, to make things more consistent with our own docs.

Also, successfully tested both slash commands and modals, and I can PR the slash changes to Poise once this is merged.

Comment thread src/builder/create_command.rs Outdated
Comment thread src/builder/create_components.rs Outdated
Comment thread src/model/application/command.rs Outdated
KiloOscarSix and others added 3 commits August 7, 2026 11:10
Co-authored-by: Meditation Mind <115960723+meditationmind@users.noreply.github.com>
Co-authored-by: Meditation Mind <115960723+meditationmind@users.noreply.github.com>
Co-authored-by: Meditation Mind <115960723+meditationmind@users.noreply.github.com>
@arqunis arqunis added enhancement An improvement to Serenity. discord feature Related to Discord's functionality. labels Aug 8, 2026
@arqunis
arqunis merged commit 37b9f43 into serenity-rs:next Aug 8, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builder Related to the `builder` module. discord feature Related to Discord's functionality. enhancement An improvement to Serenity. model Related to the `model` module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants