Skip to content

Conversation

@akiraveliara
Copy link
Member

currently only really contains the API surface for feedback

  • DiscordOverwriteCollection is a general-purpose collection of overwrites
  • TargetedDiscordOverwriteCollection is intended to view the above from the perspective of a certain target
  • DiscordPermissions now supports being created via collection expressions to ease overload resolution and generally make it flow better

breaking changes:

  • DiscordPermissions.EnumeratePermissions and DiscordPermissions.DiscordPermissionEnumerable are gone, DiscordPermissions now acts as the enumerable itself
  • DiscordPermissions.Add and DiscordPermissions.Remove have been changed to modify the current object rather than returning a new one (in contrast to the operators +/-, which create a new object).
  • several now-unnecessary overloads taking a params ReadOnlySpan<DiscordPermission> have been removed if it can be served by a DiscordPermissions, because the latter now supports collection expressions.

open questions:

  • is there any use-case for TargetedDiscordOverwriteCollection.GetAllDenyingOverwrites
  • is there any use-case for TargetedDiscordOverwriteCollection.GetAllGrantingOverwrites
  • naming: Grant vs Allow - to me there is a subtle semantic difference in that Grant emphasizes the action (i.e. editing the overwrite, which will need to be synced back to Discord) versus Allow emphasizing the state of affairs. do we disagree/not care enough to emphasize this?
  • naming: TargetedDiscordOverwriteCollection?

Copy link
Member

@VelvetToroyashi VelvetToroyashi left a comment

Choose a reason for hiding this comment

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

LGTM; I had qualms about shifting Has[All]Permissions but I suppose permissions & target == target isn't that complicated.

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