Skip to content

Clean up DiscordEmbedBuilder

Mateusz Brawański requested to merge github/fork/uwx/patch-93 into master

Created by: uwx

Summary

Tidy up DiscordEmbedBuilder. I felt it needed some housekeeping.

Changes proposed

  • Convert properties from statement body to expression body where possible (I believe they were this way before as a way to work around a VS bug. I don't know if this bug still happens)
  • Rename fields and method parameters from snake_case to camelCase (I believe this change was already bound to happen so I thought it to be a good fit for this PR)
  • Remove redundant else statements
  • Change redundant field-backed properties to auto-properties
  • Tidy up Build method - use Optional<T>.IfPresent instead of HasValue and Value
  • Remove unnecessary ReadOnlyCollection wrapper around Fields, as an implicit cast is enough. Note that this allows outside modification of the underlying list by casting, but I think that would be a specific enough use case that there's no point working around it

Notes

Is this any better in terms of effort than updating the readme?

Merge request reports

Loading