Skip to content

DisCatSharp v10.7.0 Release #661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 81 commits into
base: main
Choose a base branch
from
Draft

DisCatSharp v10.7.0 Release #661

wants to merge 81 commits into from

Conversation

Lulalaby
Copy link
Member

@Lulalaby Lulalaby commented Mar 9, 2025

No description provided.

@Lulalaby Lulalaby requested review from byterand and TheXorog March 9, 2025 12:31
@Lulalaby Lulalaby force-pushed the release/v10.7.0 branch 4 times, most recently from 5e45d23 to b42f215 Compare March 9, 2025 14:31
@Aiko-IT-Systems Aiko-IT-Systems deleted a comment from github-actions bot Mar 9, 2025
Copy link

github-actions bot commented Mar 9, 2025

Documentation test build passed! 🎉
Visit the cloudflare action run in https://github.com/Aiko-IT-Systems/DisCatSharp.Docs/commits/release/v10.7.0 for details :3

gif

@Lulalaby Lulalaby force-pushed the release/v10.7.0 branch 3 times, most recently from 5fcd853 to c536d19 Compare March 11, 2025 17:38
@Lulalaby Lulalaby linked an issue Mar 15, 2025 that may be closed by this pull request
3 tasks
@Lulalaby Lulalaby force-pushed the release/v10.7.0 branch 4 times, most recently from e1cb70c to 128c223 Compare March 27, 2025 00:20
@Lulalaby Lulalaby requested a review from Copilot March 27, 2025 04:11
Copy link

@Copilot 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 prepares the v10.7.0 release by updating attribute classes, migrating solution file references in GitHub workflows from “.sln” to “.slnx”, and introducing nullable reference types in selected ApplicationCommands contexts.

  • Updated attribute classes to remove the Inherited option on AttributeUsage and adjust property declarations.
  • Revised multiple CI/CD workflow files to reference the new “.slnx” solution file and update working directories.
  • Modified ApplicationCommands context classes to use nullable types for properties where a value may be absent.

Reviewed Changes

Copilot reviewed 122 out of 125 changed files in this pull request and generated no comments.

Show a summary per file
File Description
DisCatSharp.Attributes/RequiresOverrideAttribute.cs New attribute for requiring overrides with updated constructor/property definitions.
DisCatSharp.Attributes/DiscordInExperimentAttribute.cs Updated attribute usage and property declarations.
DisCatSharp.Attributes/RequiresFeatureAttribute.cs Revised attribute constructors and property ordering.
DisCatSharp.Attributes/DiscordUnreleasedAttribute.cs Updated attribute usage and property declarations.
DisCatSharp.Attributes/Features.cs Added an “Unknown” feature and reorganized FeatureDescriptionAttribute.
DisCatSharp.Attributes/DeprecatedAttribute.cs Updated attribute usage and property declarations.
DisCatSharp.Attributes/DiscordDeprecatedAttribute.cs Updated attribute usage and property declarations.
DisCatSharp.Attributes/ExperimentalAttribute.cs Updated attribute usage and property declarations.
.github/workflows/documentation_test.yml Adjusted restore/build commands and working directories to match the new solution file.
.github/workflows/public-dev-release.yml Changed solution file reference from “.sln” to “.slnx”.
.github/workflows/codeql-analysis.yml Updated solution file references for restore and build steps.
.github/workflows/build.yml Modified restore/build commands to use “.slnx”.
.github/workflows/internal-release.yml Modified restore commands to use “.slnx”.
.github/workflows/documentation.yml Updated restore/build commands to use “.slnx”.
DisCatSharp.ApplicationCommands/Context/AutocompleteContext.cs Changed properties to be nullable to accurately represent possible absence of data.
DisCatSharp.ApplicationCommands/Context/BaseContext.cs Changed properties to be nullable and removed deprecated members.
.github/workflows/release.yml Updated restore commands for DisCatSharp and related projects to use “.slnx”.
Files not reviewed (3)
  • Directory.Build.props: Language not supported
  • DisCatSharp.ApplicationCommands/DisCatSharp.ApplicationCommands.csproj: Language not supported
  • DisCatSharp.Attributes/DisCatSharp.Attributes.csproj: Language not supported
Comments suppressed due to low confidence (3)

DisCatSharp.ApplicationCommands/Context/AutocompleteContext.cs:29

  • [nitpick] Since the 'Guild' property is now nullable, update its XML documentation to clearly indicate that it may be null when the interaction occurs in a DM.
public DiscordGuild? Guild { get; internal init; }

.github/workflows/public-dev-release.yml:22

  • Changing the solution reference from '.sln' to '.slnx' is critical; please verify that all related build configurations and dependent workflows are updated accordingly.
-            - "DisCatSharp.sln"

.github/workflows/build.yml:46

  • Ensure that using 'DisCatSharp.slnx' here is intentional and consistent with the project structure across all CI/CD configurations.
dotnet restore --no-cache -f -v minimal DisCatSharp.slnx

@Lulalaby Lulalaby force-pushed the release/v10.7.0 branch 3 times, most recently from dcc9d96 to d5525ce Compare March 28, 2025 04:37
@Lulalaby Lulalaby added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed dependencies Pull requests that update a dependency file branding Targets the branding labels Mar 28, 2025
Lulalaby added 25 commits May 3, 2025 01:01
Added null-coalescing assignment to initialize AttachmentsInternal in various AddGcpAttachment methods. This prevents potential null reference exceptions when adding attachments.
Updated the `waveform` parameter in the `AddManualGcpAttachment` method to use a byte array instead of a UTF-8 encoded string. This simplifies the handling of waveform data and removes the need for encoding conversions.
Introduced a new constructor and properties in RequireRolesAttribute to allow role checks using role IDs in addition to role names. Updated the ExecuteCheckAsync method to handle both role names and role IDs based on the UsesRoleIds flag.
Replaced direct `DiscordColor` properties with raw string properties for JSON serialization and added computed properties to convert raw strings to `DiscordColor`. This improves flexibility and ensures proper handling of color data.
Added a check to ensure `context.Options` has elements before filtering slash commands by name. This prevents potential null reference exceptions when `context.Options` is empty.
Added checks to ensure `context.Options[0].Value` is not null or empty before processing autocomplete logic. This prevents potential null reference exceptions when handling slash command options.
Introduced a new 'Hidden' flag in the SpeakingFlags enum, which likely indicates that the user is not visible in the channel. This change adds support for handling this new flag.
Introduced a new `Autocomplete` command type in `DisCatSharpCommandType` and updated related contexts to support it. Added properties and annotations to enhance interaction handling and context initialization for autocomplete interactions.
Removed the `Client` property from `AutocompleteContext` as it is no longer needed. Updated `ComponentInteractionCreateEventArgs` to use `Interaction.Guild` for the `Guild` property and added a nullable `Member` property with a nullability annotation for better type safety.
Updated the GuildJoinedAt property in DiscordMemberPaginationFilter to have a default value of 0, ensuring it is always initialized and removing the nullable type.
Introduced a new method `WithStickerIds(IEnumerable<ulong> stickerIds)` to allow adding multiple stickers to a message. Ensures that no more than 4 stickers are added, adhering to Discord's limitations.
Updated `DiscordUnfurledMedia.Url` to be nullable and added a JSON property annotation to `DiscordCollectibles.Nameplate`. Also included a missing `using Newtonsoft.Json` directive in `DiscordCollectibles.cs`.
Added 'Newtonsoft.Json' to InternalsVisibleTo.targets for internal visibility. Changed DiscordUnfurledMedia.Url to non-nullable. Refactored DiscordApiClient to use ToDiscordObject for deserialization, improving consistency.
Lulalaby added 4 commits May 20, 2025 13:59
Introduced `FullCommandName` and `CommandName` overrides in `CommandContext` to provide access to command names. Updated `DisCatSharpCommandContext` to make `CommandName`, `SubCommandName`, and `SubSubCommandName` virtual for better extensibility.
Updated all RespondAsync method overloads in DiscordMessage.cs to include an optional 'mention' parameter, allowing control over whether the reply mentions the original message author. This enhances flexibility when responding to messages.
Renamed GCP attachment-related files from 'Message' to 'Channel' for better organization. Added a new 'DiscordMessageBuilderMethodHooks' class to centralize and extend GCP attachment handling methods. Removed the old 'DiscordMessageBuilderMethodHooks' file to avoid redundancy.
Added checks for voice message flags and improved attachment handling in DiscordApiClient methods. Renamed DiscordMessageBuilderMethodHooks.cs to DisCatSharpBuilderMethodHooks.cs for better clarity. Updated project file to include a new folder for message entities.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branding Targets the branding bug Something isn't working ci/cd Changes the CI/CD configs core Changes something in core dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request experimental Considered as Experimental by Discord help wanted Extra attention is needed v10 Targets Discord API v10
2 participants