cpp-mirai-client
v2.6.1
cpp client for mirai-api-http
|
命令执行事件 更多...
#include <CommandExecutedEvent.hpp>
Public 成员函数 | |
std::string | GetName () const |
获取命令名称(不含前缀 / ) 更多... | |
CommandSender | GetSenderType () const |
获取发送者类型 更多... | |
std::optional< User > | GetFriendSender () const |
获取好友发送者QQ,非好友发送时返回 std::nullopt 更多... | |
std::optional< GroupMember > | GetMemberSender () const |
获取群成员发送者资料,非群聊发送时返回 std::nullopt 更多... | |
MessageChain | GetCommandArgs () const |
获取命令参数内容 更多... | |
![]() | |
IEvent (const IEvent &)=default | |
IEvent (IEvent &&)=default | |
IEvent & | operator= (const IEvent &)=default |
IEvent & | operator= (IEvent &&)=default |
MiraiClient & | GetMiraiClient () const |
获取接收该事件的 MiraiClient 的引用 更多... | |
额外继承的成员函数 | |
![]() | |
static constexpr EventTypes | GetType () |
获取事件类型 更多... | |
![]() | |
IEvent ()=default | |
~IEvent ()=default | |
命令执行事件
Member Variable | Default Value |
---|---|
CommandExecutedEvent::sender_ | "" |
CommandExecutedEvent::friend_ | std::nullopt |
CommandExecutedEvent::member_ | std::nullopt |
CommandExecutedEvent::args_ | MessageChain{} |
在文件 CommandExecutedEvent.hpp 第 40 行定义.
|
inline |
获取命令名称(不含前缀 /
)
在文件 CommandExecutedEvent.hpp 第 53 行定义.
|
inline |
获取发送者类型
在文件 CommandExecutedEvent.hpp 第 55 行定义.
|
inline |
获取好友发送者QQ,非好友发送时返回 std::nullopt
在文件 CommandExecutedEvent.hpp 第 60 行定义.
|
inline |
获取群成员发送者资料,非群聊发送时返回 std::nullopt
在文件 CommandExecutedEvent.hpp 第 62 行定义.
|
inline |
获取命令参数内容
在文件 CommandExecutedEvent.hpp 第 64 行定义.