Skip to content

Commit

Permalink
Bumps into v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gehongyan committed Mar 19, 2023
1 parent 1726d5c commit d3656d4
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 26 deletions.
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,41 @@

---

## v0.3.0 [2023-03-19]

### Update Path

This release changed the default value of `everyoneHandling` parameter in `IUserMessage.Resolve` to `TagHandling.Name`.
All usages of this method need to take note of this change.

### 新增

- Added method overload `GetUserAsync(string,string,RequestOptions)` to the `IKookClient` interface and implemented it in `BaseSocketClient`.
(6555c2ba0c9993b4523a95a8cbdc544474541984)
- Added support to disable Unicode bidirectional formatting of username strings via `KookConfig.FormatUsersInBidirectionalUnicode`.
(bfc038ec4ce68124aa7eef94b421f6d0f1f941ce)

### 修复

- Fixed issue with `IUserMessage.Resolve` incorrectly textifying mentions for @everyone and @here.
(91c1175ad5eb22323cc1fe3a5cc93b9e8fc86ea5)
- Fixed deserialization issue with `IGuild.CreateRoleAsync` results. (1726d5c7c36ead0544784eb937660537c6ec1f4f)
- (Experimental feature) Fixed issue with `KookRestClient.CreateGuildAsync` not returning complete guild information.
(2b5c59d60e8db309c30cf42509a9756625e98903)

### 其它

- Added XML documentation to all public APIs. (fe1e9bcd0b7bd9a0a99c850234beef1b4993977b, 2ad3301bcc06a731e9f57bbd542484a31e77c438)
- Applied code styling. (6325b16b9ad1f8f958a8eaaf125e7d34ae280a10)

## v0.2.5 [2023-03-16]

### Update Path

This release added a new optional parameter `Nullable<GameCreationSource>` for `Kook.GetGamesAsync`,
to support getting games with specified creation source. All usages of this method that pass positional arguments
to `RequestOptions` need to be updated.

### Added

- Added an optional `Nullable<GameCreationSource>` parameter for `Kook.GetGamesAsync`.
Expand Down
76 changes: 58 additions & 18 deletions docs/changelog/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,73 @@ title: 变更日志

# 变更日志

## v0.3.0 [2023-03-19]

### 更新路线

此版本将 [IGuild.CreateRoleAsync](xref:Kook.IGuild.CreateRoleAsync*) 中的默认参数 `everyoneHandling`
变更为 [TagHandling.Name](xref:Kook.TagHandling.Name),所有使用此方法的用法都需要留意此变更。

### 新增

- [IKookClient](xref:Kook.IKookClient) 接口新增方法重载
[GetUserAsync](xref:Kook.IKookClient.GetUserAsync(System.String,System.String,Kook.RequestOptions)),并为
[BaseSocketClient](xref:Kook.WebSocket.BaseSocketClient) 实现接口 [IKookClient](xref:Kook.IKookClient)
- 新增支持通过 [KookConfig.FormatUsersInBidirectionalUnicode](xref:Kook.KookConfig.FormatUsersInBidirectionalUnicode)
禁用针对双向 Unicode 格式化用户名字符串

### 修复

- 修复 [IUserMessage.Resolve](xref:Kook.IUserMessage.Resolve*) 对全体成员与在线成员标签文本化不正确的问题
- 修复 [IGuild.CreateRoleAsync](xref:Kook.IGuild.CreateRoleAsync*) 反序列化结果失败的问题
- (实验性功能)修复 [BaseKookClient.CreateGuildAsync](xref:Kook.Rest.KookRestClientExperimentalExtensions.CreateGuildAsync*)
[KookSocketClient.CreateGuildAsync](xref:Kook.WebSocket.BaseSocketClientExperimentalExtensions.CreateGuildAsync*)
返回所创建的服务器信息不完整的问题

### 其它

- 为全部公共 API 添加 XML 文档
- 应用代码样式

## v0.2.5 [2023-03-16]

### 更新路线

此版本为 [KookRestClient.GetGamesAsync](xref:Kook.Rest.KookRestClient.GetGamesAsync*) 方法签名新增了可选可空参数
[GameCreationSource](xref:Kook.GameCreationSource),以支持获取指定创建来源的游戏信息。所有在向此方法传递位置实参
[RequestOptions](xref:Kook.RequestOptions) 的用法都需要更新。

### 新增

- 为方法 `Kook.GetGamesAsync` 新增可选参数 `Nullable<GameCreationSource>`
- 为方法 [KookRestClient.GetGamesAsync](xref:Kook.Rest.KookRestClient.GetGamesAsync*)
新增可选可空参数 [GameCreationSource](xref:Kook.GameCreationSource)

## v0.2.4 [2023-03-09]

### 新增

- 新增支持解析角色 `IRole` 的颜色类型 `ColorType` 及渐变色信息 `GradientColor`
- 新增支持解析角色 [IRole](xref:Kook.IRole) 的颜色类型 [ColorType](xref:Kook.ColorType) 及渐变色信息 [GradientColor](xref:Kook.GradientColor)

## v0.2.3 [2023-01-19]

### 新增

- 为 Bearer 类型认证新增支持 `KookRestClient.GetAdminGuildsAsync`
- 新增 `Format.Colorize` 用于 KMarkdown 文本颜色格式化
- 为 Bearer 类型认证新增支持 [KookRestClient.GetAdminGuildsAsync](xref:Kook.Rest.KookRestClientExperimentalExtensions.GetAdminGuildsAsync*)
- 新增 [Format.Colorize](xref:Kook.Format.Colorize*) 用于 KMarkdown 文本颜色格式化

### 修复

- 修复 `GetGuildsAsync` 在服务器数量较大时下载数据过慢的问题
- 修复 `GetGuildsAsync` 在 Bearer 类型认证下构造对象失败的问题
- 修复 `Color` 部分值不正确的问题
- 修复 [KookRestClient.GetGuildsAsync](xref:Kook.Rest.KookRestClient.GetGuildsAsync*) 在服务器数量较大时下载数据过慢的问题
- (实验性功能)修复 [KookRestClient.GetGuildsAsync](xref:Kook.Rest.KookRestClient.GetGuildsAsync*) 在 Bearer 类型认证下构造对象失败的问题
- 修复 [Color](xref:Kook.Color) 部分值不正确的问题

## v0.2.2 [2022-12-30]

### 修复

- 修复了 `SocketTextChannel.SendCard(s)Async` 设置 `ephemeralUser` 参数不生效的问题
- 修复了 [SocketTextChannel.SendCardAsync](xref:Kook.WebSocket.SocketTextChannel.SendCardAsync*)
[SocketTextChannel.SendCardsAsync](xref:Kook.WebSocket.SocketTextChannel.SendCardsAsync*)
设置 `ephemeralUser` 参数不生效的问题

## v0.2.1 [2022-12-25]

Expand All @@ -46,8 +83,9 @@ title: 变更日志

### 更新路线

此版本将非官方列出的接口实现分离到单独的包中,即 `INestedChannel.SyncPermissionsAsync`,使用此接口的开发者现在应该安装
Kook.Net.Experimental 包。
此版本将非官方列出的接口实现分离到单独的包中,即
[INestedChannel.SyncPermissionsAsync](xref:Kook.Rest.RestTextChannelExperimentalExtensions.SyncPermissionsAsync*)
等,使用此接口的开发者现在应该安装 Kook.Net.Experimental 包。

### 移除

Expand All @@ -59,7 +97,7 @@ Kook.Net.Experimental 包。

### 修复

- 修复了 `IGuild.OpenId` 为空时可能导致的空引用异常
- 修复了 [IGuild.OpenId](xref:Kook.IGuild.OpenId) 为空时可能导致的空引用异常

### 其它

Expand All @@ -69,12 +107,12 @@ Kook.Net.Experimental 包。

### 更新路线

此版本将 `SocketGuild.MemberCount` 的类型从 `int` 更改为 `int?`,其中 `null` 值表示未知的服务器成员数量。此外,类似的更改发生也在
`SocketGuild.HasAllMembers` 上。所有依赖这两个属性的用法都需要更新。
此版本将 [SocketGuild.MemberCount](xref:Kook.WebSocket.SocketGuild.MemberCount) 的类型从 `int` 更改为 `int?`,其中 `null` 值表示未知的服务器成员数量。此外,类似的更改发生也在
[SocketGuild.HasAllMembers](xref:Kook.WebSocket.SocketGuild.HasAllMembers) 上。所有依赖这两个属性的用法都需要更新。

### 变更

- `AlwaysDownloadUsers` 也将定义是否在启动时加载服务器成员数量
- [KookSocketConfig.AlwaysDownloadUsers](xref:Kook.WebSocket.KookSocketConfig.AlwaysDownloadUsers) 也将定义是否在启动时加载服务器成员数量

### 修复

Expand All @@ -85,14 +123,16 @@ Kook.Net.Experimental 包。

### 新增

- 新增 @Kook.IGuild.GetActiveBoostSubscriptionsAsync
- 新增 [IGuild.GetActiveBoostSubscriptionsAsync](xref:Kook.IGuild.GetActiveBoostSubscriptionsAsync*)
- JSON 反序列化失败时将输出报文本体至日志管理器

### 修复

- 修复 @Kook.WebSocket.BaseSocketClient.UserUnbanned 未能正常触发的问题
- 修复 @Kook.WebSocket.BaseSocketClient.GuildAvailable 事件触发时 @Kook.WebSocket.KookSocketClient.DownloadVoiceStatesAsync*
@Kook.WebSocket.KookSocketClient.DownloadBoostSubscriptionsAsync* 被意外绕过的问题
- 修复 [BaseSocketClient.UserUnbanned](xref:Kook.WebSocket.BaseSocketClient.UserUnbanned) 未能正常触发的问题
- 修复 [BaseSocketClient.GuildAvailable](xref:Kook.WebSocket.BaseSocketClient.GuildAvailable) 事件触发时
[DownloadVoiceStatesAsync](xref:Kook.WebSocket.KookSocketClient.DownloadVoiceStatesAsync*)
[DownloadBoostSubscriptionsAsync](xref:Kook.WebSocket.KookSocketClient.DownloadBoostSubscriptionsAsync*)
被意外绕过的问题

## v0.1.0 [2022-11-15]

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/text_commands/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ title: 文本命令框架入门
### 模块属性

具有公共 `set` 访问器属性的模块在模块构造后会被服务容器中,详细信息可参考 @Guides.TextCommands.DI 。
具有公共 `set` 访问器属性的模块在模块构造后会被依赖服务注入,详细信息可参考 @Guides.TextCommands.DI 。

### 模块组

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static Task<RestVoiceRegion> GetVoiceRegionAsync(this KookRestClient clie
=> ExperimentalClientHelper.GetVoiceRegionAsync(client, id, options);

/// <summary>
/// Creates a guild for the logged-in user who is in less than 10 active guilds.
/// Creates a guild for the logged-in user.
/// </summary>
/// <remarks>
/// This method creates a new guild on behalf of the logged-in user.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Kook.WebSocket;
public static class BaseSocketClientExperimentalExtensions
{
/// <summary>
/// Creates a guild for the logged-in user who is in less than 10 active guilds.
/// Creates a guild for the logged-in user.
/// </summary>
/// <remarks>
/// This method creates a new guild on behalf of the logged-in user.
Expand Down
2 changes: 1 addition & 1 deletion src/Kook.Net.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<VersionPrefix>0.2.5</VersionPrefix>
<VersionPrefix>0.3.0</VersionPrefix>
<!-- <VersionSuffix>rc</VersionSuffix>-->
<LangVersion>latest</LangVersion>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
Expand Down
2 changes: 0 additions & 2 deletions test/Kook.Net.Tests.Unit/MockedEntities/MockedTextChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ public IAsyncEnumerable<IReadOnlyCollection<IGuildUser>> GetUsersAsync(CacheMode
public Task<ICategoryChannel> GetCategoryAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null) =>
throw new NotImplementedException();

public Task SyncPermissionsAsync(RequestOptions options = null) => throw new NotImplementedException();

public Task<IUser> GetCreatorAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null) =>
throw new NotImplementedException();

Expand Down
2 changes: 0 additions & 2 deletions test/Kook.Net.Tests.Unit/MockedEntities/MockedVoiceChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ public IAsyncEnumerable<IReadOnlyCollection<IGuildUser>> GetUsersAsync(CacheMode
public Task<ICategoryChannel> GetCategoryAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null) =>
throw new NotImplementedException();

public Task SyncPermissionsAsync(RequestOptions options = null) => throw new NotImplementedException();

public Task<IUser> GetCreatorAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null) =>
throw new NotImplementedException();

Expand Down

0 comments on commit d3656d4

Please sign in to comment.