Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 缺少BotLeaveEventDisband事件 #69

Merged
merged 2 commits into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions Mirai.Net/Data/Events/Concretes/Group/DisbandedEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace Mirai.Net.Data.Events.Concretes.Group
{

/// <summary>
/// Bot因群主解散群而退出群
/// </summary>
public record DisbandedEvent : EventBase
{

/// <summary>
/// 事件类型
/// </summary>
public override Events Type { get; set; } = Events.Disbanded;

/// <summary>
/// Bot所在被解散的群的信息
/// </summary>
[JsonProperty("group")]
public Shared.Group Group { get; set; }

/// <summary>
/// Bot离开群后获取操作人的 Member 对象
/// </summary>
[JsonProperty("operator")]
public Shared.Member Operator { get; set; }

}
}
9 changes: 8 additions & 1 deletion Mirai.Net/Data/Events/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,14 @@ public enum Events
/// </summary>
[Description("BotLeaveEventKick")]
[EnumMember(Value = "BotLeaveEventKick")]
Kicked,
Kicked,

/// <summary>
/// Bot因群主解散群而退出群
/// </summary>
[Description("BotLeaveEventDisband")]
[EnumMember(Value = "BotLeaveEventDisband")]
Disbanded,

/// <summary>
/// 群消息撤回
Expand Down