Releases: gehongyan/Kook.Net
Releases · gehongyan/Kook.Net
v0.10.3
v0.10.2
Fixes
- Resolved an issue where injected debugging methods in
KookDebuggerscaused application crashes when exceptions were thrown.
Changes
- Moved the configuration option
AutoLogoutBeforeLogintoKookSocketConfig.
Others
- Added builds targeting .NET 10 and upgraded the target framework of the sample and test projects to .NET 10.
- Migrated to the
slnxsolution format. - Migrated to CPM (centralized package management).
- Updated NuGet dependencies.
Full Changelog: v0.10.1...v0.10.2
v0.10.1
Added
- Added
KookRestConfig.AutoLogoutBeforeLogin, which configures whether to force logout other clients connected to the KOOK gateway when logging into theBaseKookClientclient. This ensures that the current client's connection will not miss any business events due to connections from other clients. - Added support for pinning and unpinning messages in text channels. You can use methods such as
IUserMessage.PinAsync,IUserMessage.UnpinAsync,ITextChannel.PinMessageAsync, andITextChannel.UnpinMessageAsyncto perform these operations. MessageReferencehas a new propertyReplyMessageId, which is used for daily message send limit discount. If thereplyMessageIdparameter is left empty in the constructor, it will automatically use the value of thequotedMessageIdparameter.
Full Changelog: v0.10.0...v0.10.1
v0.10.0
Update Path
This update includes some breaking changes. Please review the "Changed" section carefully.
Added
- Added static class
KookDebuggerto support outputting debugging information related to Kook.Net's underlying API requests, gateway payloads, rate limiting, and voice logs for interactions with the KOOK server. - Added support for publishing, retrieving, and deleting threads, posts, and replies within thread channels (
IThreadChannel). Also added support for retrieving the default layout (DefaultLayout) and default sort mode (DefaultSortMode) of thread channels. ThreadExtensionsnow includes the extension methodGetJumpUrlto retrieve jump links for thread-related entities.- Added support for retrieving the currently effective gateway intents via
KookSocketClient.GatewayIntents. - Added the error code enum value
KookErrorCode.ThreadContentAuditing. ImageElementandImageElementBuidlernow support theFallbackUrlproperty.- Added support for the
RecordAudiopermission value in server and channel permission enums. - (Experimental Feature) Added support for searching thread topic tags by keyword via
QueryThreadTagsAsync.
Changed
- Changed the enum values of
VoiceQualityto use names that are independent of specific bitrate values. - Moved
Kook.Commands.MessageExtensions.TryExpandCardContenttoKook.MessageExtensions.TryExtractCardContent. IPermissionOverwrite<TTarget>has been changed toIPermissionOverwrite<TTarget, TId>. Now,TTarget Targetrepresents the target entity type for the permission overwrite,TId TargetIdrepresents the type of the target entity's ID, andPermissionOverwriteTarget TargetTypeindicates the type of the target.- For entities or data types returned by the KOOK API or delivered by the gateway, properties of type
DateTimeOffsetwithin interfaces or classes such asIThread,IThreadPost,IThreadReply,IMessage,IGuildUser,IIntimacy,IIntimacyRelation,IInvite,CountModule,Quote, andBoostSubscriptionMetadatanow default to the local machine's time zone.
Fixed
- Fixed issues with methods for adding and removing guild bans failing.
Optimized
- The type for gateway payloads has been changed to
JsonElementto avoid an extra level of boxing. - Gateway payload deserialization now uses asynchronous methods.
- The
Card.Buildmethod now validates that theThemeisInvisibleonly for module types that support borderless cards.
Misc
- Added quick reference documentation for thread-related interfaces.
Full Changelog: v0.9.11...v0.10.0
v0.9.11
Added
- Added support for message template related APIs.
Debugmode log level now outputs the gateway session ID.
Changed
- Changed the
templateIdparameter type in message sending methods frominttoulongto support a larger message ID range.
Fixed
- Fixed an issue where changes in the gradient color data structure for roles caused application startup failures.
Misc
- Added a quick reference document for the message template API.
Full Changelog: v0.9.10...v0.9.11
v0.9.10
Fixed
- Fixed an issue where the text command framework could not correctly parse file, audio, and video card modules as
Uriparameters.
Full Changelog: v0.9.9...v0.9.10
v0.9.9
v0.9.8
Added
- Added
BaseSocketClient.UnknownDispatchReceivedfor handling unknown event types. - Added
KookSocketConfig.SuppressUnknownDispatchWarningsto suppress warnings for unknown event types.
Fixed
- Fixed an issue where
RelationTypeandCreatedAtonIIntimacyRelationcould be null, causing problems retrieving intimacy relation information. These properties are now nullable. - Fixed a potential issue where
SocketMessage.Updatecould block asynchronous threads abnormally.
Others
- Updated related dependency versions.
- Migrated the test framework to xunit.v3.
Full Changelog: v0.9.7...v0.9.8
v0.9.7
Added
- Added support for multi-instance injection of Webhook clients.
Fixed
- Fixed an issue where the overload method of
AddKookAspNetWebhookClientreceivingKookAspNetWebhookConfigfailed to properly register client instances.
Misc
- Removed dependency on
FluentAssertions. - Fixed null reference warnings in F# sample code.
- Optimized entity creation process in integration test projects by using
IAsyncLifetime. - Improved the OAuth sample project by providing example code for retrieving joined guilds.
Full Changelog: v0.9.6...v0.9.7
v0.9.6
Added
- Added support for managing intimate relationships.
- The pipe message client now supports sending card messages, as well as quoting messages and ephemeral user.
- Added the
Modulesproperty to theICardinterface.
Fixed
- Corrected the rate value for preemptive rate limiting.
- Fixed an issue where the maximum capacity of the message cache could overflow.
- Fixed an issue where the cache was not properly updated when a guild channel was deleted.
Misc
- Removed support for the .NET 6.0 target framework. Updated the target framework for dependency injection, message queue, and hosting extension packages to .NET 9.0.
- Updated all externally referenced NuGet packages to their latest versions.
Full Changelog: v0.9.5...v0.9.6