16#ifndef MIRAI_BOT_EVENTS_HPP_
17#define MIRAI_BOT_EVENTS_HPP_
159 int64_t EventId_ = 0;
162 std::string GroupName_{};
163 std::string nickname_{};
164 std::string message_{};
202 std::optional<GroupMember> inviter_ = std::nullopt;
210 std::optional<GroupMember>
GetInviter()
const {
return this->inviter_; }
225template <
class Event>
287 std::optional<GroupMember> operator_ = std::nullopt;
293 std::optional<GroupMember>
GetOperator()
const {
return this->operator_; }
321 std::chrono::seconds
GetMuteTime()
const {
return std::chrono::seconds(this->duration_); }
350#define DECLARE_TYPE_ENUM(event_type) \
351 template<> struct GetEventType<event_type::GetType()> \
353 using type = event_type; \
370#undef DECLARE_TYPE_ENUM
QQ_t GetQQ() const
获取BotQQ
Group GetGroup() const
获取群聊信息
PERMISSION GetOriginal() const
获取Bot更改前的权限
PERMISSION GetCurrent() const
获取Bot当前权限
std::string GetMessage() const
获取邀请信息
QQ_t GetUserId() const
获取邀请人QQ
GID_t GetGroupId() const
获取群聊id
std::string GetGroupName() const
获取群聊名称
int64_t GetEventId() const
获取事件id,唯一标识符
std::string GetNickname() const
获取邀请人昵称
Group GetGroup() const
获取群聊信息
std::optional< GroupMember > GetInviter() const
获取邀请人信息,若无则返回 std::nullopt
GroupMember GetOperator() const
获取操作员(群主)信息
std::optional< GroupMember > GetOperator() const
获取操作员信息,若无则返回 std::nullopt
Group GetGroup() const
获取群聊信息
static constexpr EventTypes TYPE_
GroupMember GetOperator() const
获取操作员信息
std::chrono::seconds GetMuteTime() const
获取禁言时间
GroupMember GetOperator() const
获取操作员信息
Common interface for all event types
@ BotInvitedJoinGroupRequest
@ BotGroupPermissionChange
DECLARE_TYPE_ENUM(BotOfflineEventActive)