-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 添加 Mirai-CSharp.NativeAssets.LinuxArm 以支持基于arm(64)的linux系统 * 完成对Image和Voice的拆离 为获取指定ID消息方法、设置群精华消息方法、撤回消息方法添加重载以适配mirai-api-http v2.6.0+ * 添加了4个同步消息事件参数 为 `IMiraiHttpSession` 添加了 `GetBotListAsync`, `GetChatHistoryAsync` 方法 * 允许通过修改Scheme属性更改MiraiHttpSessionOptions.BaseUrl中使用的Scheme
- Loading branch information
1 parent
0127929
commit 7d8daa9
Showing
62 changed files
with
1,061 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
Mirai-CSharp.HttpApi/Exceptions/MissingVoiceCoderException.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
Mirai-CSharp.HttpApi/Models/EventArgs/Friend/FriendSyncMessageEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
using Mirai.CSharp.HttpApi.Models.ChatMessages; | ||
using Mirai.CSharp.HttpApi.Parsers.Attributes; | ||
using Mirai.CSharp.HttpApi.Utility.JsonConverters; | ||
using ISharedFriendInfo = Mirai.CSharp.Models.IFriendInfo; | ||
using ISharedFriendSyncMessageEventArgs = Mirai.CSharp.Models.EventArgs.IFriendSyncMessageEventArgs; | ||
using ISharedJsonFriendMessageEventArgs = Mirai.CSharp.Models.EventArgs.IFriendSyncMessageEventArgs<System.Text.Json.JsonElement>; | ||
|
||
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. | ||
namespace Mirai.CSharp.HttpApi.Models.EventArgs | ||
{ | ||
/// <summary> | ||
/// 提供好友同步消息的相关信息接口。继承自 <see cref="ISharedJsonFriendMessageEventArgs"/> 和 <see cref="ICommonMessageEventArgs"/> | ||
/// </summary> | ||
[MappableMiraiHttpMessageKey("FriendSyncMessage")] | ||
public interface IFriendSyncMessageEventArgs : ISharedJsonFriendMessageEventArgs, ICommonMessageEventArgs | ||
{ | ||
/// <inheritdoc cref="ISharedFriendSyncMessageEventArgs.Subject"/> | ||
[JsonConverter(typeof(ChangeTypeJsonConverter<IFriendInfo, FriendInfo>))] | ||
[JsonPropertyName("subject")] | ||
new IFriendInfo Subject { get; } | ||
|
||
#if !NETSTANDARD2_0 | ||
[JsonConverter(typeof(ChangeTypeJsonConverter<ISharedFriendInfo, FriendInfo>))] | ||
[JsonPropertyName("subject")] | ||
ISharedFriendInfo ISharedFriendSyncMessageEventArgs.Subject => Subject; | ||
#endif | ||
} | ||
|
||
public class FriendSyncMessageEventArgs : CommonMessageEventArgs, IFriendSyncMessageEventArgs | ||
{ | ||
/// <inheritdoc/> | ||
[JsonConverter(typeof(ChangeTypeJsonConverter<IFriendInfo, FriendInfo>))] | ||
[JsonPropertyName("subject")] | ||
public IFriendInfo Subject { get; set; } | ||
|
||
[Obsolete("此类不应由用户主动创建实例。")] | ||
public FriendSyncMessageEventArgs() { } | ||
|
||
[Obsolete("此类不应由用户主动创建实例。")] | ||
public FriendSyncMessageEventArgs(IChatMessage[] chain, IFriendInfo subject) : base(chain) | ||
{ | ||
Subject = subject; | ||
} | ||
|
||
public override string ToString() | ||
=> $"{Subject.Name}({Subject.Id})[SYNC] <- {string.Join("", (IEnumerable<ChatMessage>)Chain)}"; | ||
|
||
#if NETSTANDARD2_0 | ||
[JsonConverter(typeof(ChangeTypeJsonConverter<ISharedFriendInfo, FriendInfo>))] | ||
[JsonPropertyName("subject")] | ||
ISharedFriendInfo ISharedFriendSyncMessageEventArgs.Subject => Subject; | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
Mirai-CSharp.HttpApi/Models/EventArgs/Group/GroupDisbandEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using Mirai.CSharp.HttpApi.Parsers.Attributes; | ||
using ISharedGroupDisbandEventArgs = Mirai.CSharp.Models.EventArgs.IGroupDisbandEventArgs<System.Text.Json.JsonElement>; | ||
|
||
namespace Mirai.CSharp.HttpApi.Models.EventArgs.Group | ||
{ | ||
/// <summary> | ||
/// 提供群被群主解散后bot离开群相关信息的接口。继承自 <see cref="ISharedGroupDisbandEventArgs"/> 和 <see cref="IGroupOperatingEventArgs"/> | ||
/// </summary> | ||
[MappableMiraiHttpMessageKey("BotLeaveEventDisband")] | ||
public interface IGroupDisbandEventArgs : ISharedGroupDisbandEventArgs, IGroupOperatingEventArgs | ||
{ | ||
|
||
} | ||
|
||
public class GroupDisbandEventArgs : GroupOperatingEventArgs, IGroupDisbandEventArgs | ||
{ | ||
[Obsolete("此类不应由用户主动创建实例。")] | ||
public GroupDisbandEventArgs() | ||
{ | ||
|
||
} | ||
|
||
[Obsolete("此类不应由用户主动创建实例。")] | ||
public GroupDisbandEventArgs(IGroupInfo group, IGroupMemberInfo @operator) : base(group, @operator) | ||
{ | ||
|
||
} | ||
} | ||
} |
Oops, something went wrong.