v0.9.0
Update Roadmap
This update introduces the following new packages:
Kook.Net.Webhook
: Webhook support packageKook.Net.Webhook.HttpListener
: Webhook implementation package for HTTP ListenerKook.Net.Webhook.AspNet
: Webhook implementation package integrated with ASP.NETKook.Net.MessageQueue.InMemory
: In-memory message queue support packageKook.Net.MessageQueue.MassTransit
: MassTransit message queue support packageKook.Net.DependencyInjection.Microsoft
: Dependency injection extension package for Microsoft.Extensions.DependencyInjectionKook.Net.Hosting
: Hosting service extension package
The Kook.Net
package now references the Kook.Net.Webhook
package and has removed the reference to the Kook.Net.CardMarkup
package. If you need to continue using the functionality for building card messages via markup language, please reference the Kook.Net.CardMarkup
package separately.
Voice connection and streaming features have been changed to be implemented by an officially supported method. The newly added API for receiving voice data streams is experimental and not officially supported.
The exception thrown by Emote.Parse
when an error occurs has been changed from ArgumentException
to FormatException
. The return result of Emote.ToString
has been changed to be equivalent to the result of ToKMarkdownString
. The link format provided by MessageExtensions.GetJumpUrl
has been adjusted. SocketGuild.ValidBoostSubscriptions
has been changed to SocketGuild.ActiveBoostSubscriptions
. Tag<T>
has been changed to Tag<TKey, TValue>
.
Added
- Added support for custom message queues, with the default implementation being synchronous message processing. Support for setting the message queue provider by installing extension NuGet packages and configuring
KookSocketConfig.MessageQueueProvider
.Kook.Net.MessageQueue.InMemory
is the in-memory queue support package, andKook.Net.MessageQueue.MassTransit
is the MassTransit queue support package. Refer to the examples for usage. - Added support for Webhook mode, which is currently implemented based on the Socket implementation. The Webhook integrated by Kook.Net is the abstract class
KookWebhookClient
.Kook.Net.Webhook.HttpListener
is the Webhook implementation package for HTTP Listener, andKook.Net.Webhook.AspNet
is the Webhook implementation package integrated with ASP.NET. Refer to the examples for usage. - Added extension methods package for the Microsoft.Extensions.DependencyInjection dependency injection framework
Kook.Net.DependencyInjection.Microsoft
, to support quick addition of various clients from Kook.Net, refer to the examples for usage. - Added hosting service extension package based on
IHost
andIHostedService
Kook.Net.Hosting
, to support quick addition of various clients from Kook.Net as hosting services, refer to the examples for usage. - Added support for receiving voice data stream related APIs. (Experimental feature, not officially supported)
- The text command framework has added built-in support for parameter parsing of
DateOnly
andTimeOnly
types, added support for parameter parsing ofUri
type, and added command parsing for mixed text-image messages. - Added extension method
MaybeTextImageMixedMessage
onIUserMessage
to determine if it might be a mixed text-image message. - Made the constructor of
Emote
public. - Added
KookComparers
class to support KOOK entities comparison by ID. - Added
Parse
andTryParse
methods to theColor
class. IKookClient
providesLoginAsync
andLogoutAsync
methods.- Added
TagUtil
to convertITag
toTag<TKey, TValue>
.
Fixed
- Fixed the issue where the
AudioClient.ClientDisconnected
event was not correctly raised. - Fixed the issue where
IsOwner
onRest/SocketGuildUser
could be determined but the value wasnull
. - Fixed the issue where
RequireRoleAttribute
could be incorrectly added to inappropriate targets. - Fixed the issue where the server member update event threw an exception when the nickname parameter was not carried.
- Fixed the issue where the implementation on
IGuild
did not expose theIsAvailable
property. - Fixed the issue where the values of
EveryoneMention
andHereMention
inITag
might be0
instead of0U
.
Changed
- After user code manipulates server member roles via API, the framework will attempt to update the cache to get as accurate role information as possible without updating user role information via API.
- The exception thrown by
Emote.Parse
when an error occurs has been changed fromArgumentException
toFormatException
. - The return result of
Emote.ToString
has been changed to be equivalent to the result ofToKMarkdownString
. - Voice connection and streaming features have been changed to be implemented by an officially supported method.
- Changed the link format provided by
MessageExtensions.GetJumpUrl
, adjusted the server channel to the newly supported official link format, and adjusted the parameters in private chat channels to use chat codes. - Changed
Tag<T>
toTag<TKey, TValue>
. - Adjusted the result of
IUserMessage.Resolve
to be more in line with the KMarkdown format. - Renamed the first parameter on
ModuleBase.ReplyTextAsync
totext
. - Renamed
SocketGuild.ValidBoostSubscriptions
toSocketGuild.ActiveBoostSubscriptions
. - The
Kook.Net
package no longer includes a reference toKook.Net.CardMarkup
.
Removed
- Due to the deactivation of many unofficial interfaces, most APIs on Kook.Net.Experimental have been removed.
Misc
- XML documentation has been rewritten in Simplified Chinese.
- Added usage examples for MessageQueue, Webhook, and OAuth.
- Added Simplified Chinese README.
Full Changelog: v0.8.0...v0.9.0