Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Commit a72a953

Browse files
committed
fixed: typo;
1 parent bba93ec commit a72a953

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

include/mirai/events/BotLeaveEventKick.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace Cyan
1919
{
2020
public:
2121
Group_t Group;
22-
std::optional<GroupMember> Inviter;
22+
std::optional<GroupMember> Operator;
2323

2424
static MiraiEvent GetMiraiEvent()
2525
{
@@ -29,11 +29,11 @@ namespace Cyan
2929
virtual bool Set(const json& j) override
3030
{
3131
this->Group.Set(j["group"]);
32-
if (!j["invitor"].is_null())
32+
if (!j["operator"].is_null())
3333
{
3434
GroupMember tmp;
35-
tmp.Set(j["invitor"]);
36-
this->Inviter = tmp;
35+
tmp.Set(j["operator"]);
36+
this->Operator = tmp;
3737
}
3838
return true;
3939
}
@@ -42,8 +42,7 @@ namespace Cyan
4242
json j = json::object();
4343
j["type"] = "BotLeaveEventKick";
4444
j["group"] = this->Group.ToJson();
45-
// Not a typo, MAH made a typo.
46-
j["invitor"] = (Inviter ? this->Inviter->ToJson() : json(nullptr));
45+
j["operator"] = (Operator ? this->Operator->ToJson() : json(nullptr));
4746
return j;
4847
}
4948

0 commit comments

Comments
 (0)