-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
base: main
Are you sure you want to change the base?
Conversation
5e45d23
to
b42f215
Compare
Documentation test build passed! 🎉 |
5fcd853
to
c536d19
Compare
46d1d6c
to
0101d86
Compare
e1cb70c
to
128c223
Compare
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.
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
dcc9d96
to
d5525ce
Compare
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.
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.
No description provided.