Visitar URL original
support invite target users by AlexanderTPohl · Pull Request #2428 · DSharpPlus/DSharpPlus · GitHub
Skip to content

support invite target users - #2428

Merged
akiraveliara merged 6 commits into
DSharpPlus:masterfrom
AlexanderTPohl:invite-targetusers
Apr 4, 2026
Merged

akiraveliara merged 6 commits into
DSharpPlus:masterfrom
AlexanderTPohl:invite-targetusers

Conversation

@AlexanderTPohl

@AlexanderTPohl AlexanderTPohl commented Apr 3, 2026 •

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

Implemented support for all invite target users endpoints

Details

Adds support for all target user endpoints and modified the CreateInvite endpoint to support the invite creation with target users.
The in the api requried csv file is created from IEnumerable<ulong> and deserialized to IReadOnlyList<ulong> to simplify usage.

Changes proposed

  • MultipartRestRequest now supports to set the fieldname for files
  • CreateChannelInvite supports the invite creation with Targetusers
  • Added support for GetTargetUsers endpoint
  • Added support for UpdateTargetUsers endpoint
  • Added support for GetTargetUsersJobStatus endpoint
  • Added utilities methods for creating and reading a csv stream

Notes

For the exceptions to work properly a fix for the issued adressed in #2426 is needed.

  • All features in this pull request were tested.

@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.

please note that i wrote the suggested changes off memory in the github web UI, you should test whether they work (or come up with something similar, point is that target_users is intended for potentially very large collections and i would like the code to allocate less intermediary memory)

Comment thread DSharpPlus/Utilities.cs Resolved
Comment thread DSharpPlus/Utilities.cs Resolved
Comment thread DSharpPlus/Utilities.cs Resolved
Comment thread DSharpPlus/Utilities.cs Resolved
Comment thread DSharpPlus/Utilities.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.

one review comment remains from my previous review (line splitting on DiscordChannel.CreateInviteAsync), rtm otherwise

@akiraveliara
akiraveliara merged commit ae799a4 into DSharpPlus:master Apr 4, 2026
1 check passed
@AlexanderTPohl
AlexanderTPohl deleted the invite-targetusers branch April 4, 2026 18:54
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.

2 participants