Skip to content

Conversation

@KubaZ2
Copy link
Member

@KubaZ2 KubaZ2 commented Nov 2, 2025

Updated JsonParty.Size to long[]? to support larger values. Replaced CurrentSize and MaxSize in Party with PartySize. Introduced PartySize class for better encapsulation. Updated PartySizeProperties to use long for size properties.

Updated `JsonParty.Size` to `long[]?` to support larger values.
Replaced `CurrentSize` and `MaxSize` in `Party` with `PartySize`.
Introduced `PartySize` class for better encapsulation.
Updated `PartySizeProperties` to use `long` for size properties.
@KubaZ2 KubaZ2 requested a review from Copilot November 2, 2025 17:46
@github-actions
Copy link

github-actions bot commented Nov 2, 2025

The documentation preview is available at https://preview.netcord.dev/208.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the party size handling in the Gateway module to use long instead of int for size values and introduces a new PartySize wrapper class to encapsulate the size array.

  • Changed party size data types from int to long across all related classes
  • Introduced PartySize class to wrap the size array and expose CurrentSize and MaxSize properties
  • Refactored Party class to use the new PartySize type instead of separate nullable properties

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
NetCord/Gateway/PartySize.cs New wrapper class for party size data that implements IJsonModel<long[]>
NetCord/Gateway/Party.cs Refactored to use PartySize object instead of separate properties
NetCord/Gateway/PartySizeProperties.cs Changed property and parameter types from int to long
NetCord/Gateway/JsonModels/JsonParty.cs Changed Size array type from int[] to long[]

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@KubaZ2 KubaZ2 merged commit e185479 into alpha Nov 2, 2025
7 checks passed
@KubaZ2 KubaZ2 deleted the fix/possible-overflow-for-presence-parties branch November 2, 2025 17:53
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