Visitar URL original
Made DiscordMessageFile a more generic file container by AlexanderTPohl · Pull Request #2422 · DSharpPlus/DSharpPlus · GitHub
Skip to content

Made DiscordMessageFile a more generic file container - #2422

Merged
akiraveliara merged 4 commits into
DSharpPlus:masterfrom
AlexanderTPohl:master
Mar 15, 2026
Merged

akiraveliara merged 4 commits into
DSharpPlus:masterfrom
AlexanderTPohl:master

Conversation

@AlexanderTPohl

Copy link
Copy Markdown
Contributor
  • This pull request was written by AI
  • This pull request was assisted by AI, but you wrote the final code
  • This pull request did not involve AI in any way

Summary

Changed DiscordMessageFile to DiscordFile to be a more generic container for future use outside of the DiscordMessageBuilder and solved inconsistencys.

Details

Most of the AddFileOptions handling was moved to the build of the multipart request. The behaviour of the AddFileOptions remains the same.

Changes proposed

  • Renamed DiscordMessageFile to DiscordFile
  • Moved reset stream logic into the build request method and solved inconsistent stream resetting.
  • Added support for AddFileOptions.CloseStream and AddFileOptions.ResetStream outside of the MessageBuilder

Notes

  • All features in this pull request were tested.

Comment thread DSharpPlus/Entities/DiscordFile.cs Resolved

@akiraveliara akiraveliara left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

implementation looks good, got a few docs/code style picks

Comment thread DSharpPlus/Entities/AddFileOptions.cs Resolved
Comment thread DSharpPlus/Entities/AddFileOptions.cs Resolved
@akiraveliara
akiraveliara merged commit 6631045 into DSharpPlus:master Mar 15, 2026
1 check passed
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.

2 participants