submodule对gitea不管用,所以直接拉了一份拉格兰
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Lagrange.OneBot.Core.Entity.Meta;
|
||||
|
||||
[Serializable]
|
||||
public class OneBotHeartBeat(uint selfId, int interval, object status) : OneBotMeta(selfId, "heartbeat")
|
||||
{
|
||||
[JsonPropertyName("interval")] public int Interval { get; set; } = interval;
|
||||
|
||||
[JsonPropertyName("status")] public object Status { get; set; } = status;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Lagrange.OneBot.Core.Entity.Meta;
|
||||
|
||||
[Serializable]
|
||||
public class OneBotLifecycle(uint selfId, string subType) : OneBotMeta(selfId, "lifecycle")
|
||||
{
|
||||
[JsonPropertyName("sub_type")] public string SubType { get; set; } = subType;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Lagrange.OneBot.Core.Entity.Meta;
|
||||
|
||||
[Serializable]
|
||||
public abstract class OneBotMeta(uint selfId, string metaEventType) : OneBotEntityBase(selfId, "meta_event")
|
||||
{
|
||||
[JsonPropertyName("meta_event_type")] public string MetaEventType { get; set; } = metaEventType;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Lagrange.OneBot.Core.Entity.Meta;
|
||||
|
||||
[Serializable]
|
||||
public class OneBotStatus(bool online, bool good)
|
||||
{
|
||||
[JsonPropertyName("app_initialized")] public bool AppInitialized { get; set; } = true;
|
||||
|
||||
[JsonPropertyName("app_enabled")] public bool AppEnabled { get; set; } = true;
|
||||
|
||||
[JsonPropertyName("app_good")] public bool AppGood { get; set; } = true;
|
||||
|
||||
[JsonPropertyName("online")] public bool Online { get; set; } = online;
|
||||
|
||||
[JsonPropertyName("good")] public bool Good { get; set; } = good;
|
||||
}
|
||||
Reference in New Issue
Block a user