GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Cleanup `DiscordOverwriteBuilder` by OoLunar · Pull Request #2142 · DSharpPlus/DSharpPlus

Conversation

@OoLunar

@OoLunar OoLunar commented Oct 29, 2024

Copy link
Copy Markdown
Contributor

Summary

The DiscordOverwriteBuilder was written when specific language features were not made available. As time has passed, it's time to cleanup the class to be a bit more useful.

  • FromAsync is now static.
  • There is now an empty constructor to be used with object initialization syntax.

Notes

Tested.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@OoLunar
Change the overwrite builder to... make more sense
fe8fddd
@OoLunar OoLunar added enhancement core labels Oct 29, 2024
@OoLunar OoLunar added this to the v5.0 milestone Oct 29, 2024
@OoLunar
OoLunar requested a review from akiraveliara October 29, 2024 03:19
@OoLunar OoLunar self-assigned this Oct 29, 2024
akiraveliara
akiraveliara requested changes Oct 30, 2024
View reviewed changes

@akiraveliara akiraveliara left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

builders should not require any fields at setup time - what if the user wishes to only template the permissions and specify the target later?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
OoLunar added 4 commits October 31, 2024 00:45
@OoLunar
Address the allegations
ac17882
@OoLunar
Fix overwrite type
36093a1
@OoLunar
Make From a static method
df3078b
@OoLunar
Fix compiler errors
91b91ff
akiraveliara
akiraveliara approved these changes Nov 3, 2024
View reviewed changes
@akiraveliara
akiraveliara merged commit e33ee7a into master Nov 3, 2024
@akiraveliara
akiraveliara deleted the oolunar/static-from branch November 3, 2024 11:33
@akiraveliara akiraveliara mentioned this pull request Nov 3, 2024
v5 breaking changes tracking issue #1585
Open
Instellate pushed a commit that referenced this pull request Nov 4, 2024
@OoLunar @Instellate
Cleanup DiscordOverwriteBuilder (#2142)
3e5674f
* Change the overwrite builder to... make more sense

* Address the allegations

* Fix overwrite type

* Make `From` a static method

* Fix compiler errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@akiraveliara akiraveliara akiraveliara approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@OoLunar OoLunar

Labels

core enhancement

Projects

None yet

Milestone

v5.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@OoLunar @Naamloos @akiraveliara
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.