cpp-mirai-client
v2.6.1
cpp client for mirai-api-http
|
图片类消息 更多...
#include <ImageMessage.hpp>
Public 成员函数 | |
ImageMessageImpl ()=default | |
ImageMessageImpl (MiraiImage image) | |
ImageMessageImpl (std::string ImageId, std::string url, std::string path, std::string base64) | |
MiraiImage | GetImage () const |
获取消息中的图片 更多... | |
MessageImpl & | SetImageId (std::string ImageId) |
设置图片id 更多... | |
MessageImpl & | SetUrl (std::string url) |
设置图片链接 更多... | |
MessageImpl & | SetPath (std::string path) |
设置图片路径 更多... | |
MessageImpl & | SetBase64 (std::string base64) |
设置图片base64编码 更多... | |
MessageImpl & | SetImage (MiraiImage image) |
由 MiraiImage 设置图片内容 更多... | |
![]() | |
std::unique_ptr< IMessage > | clone () const override |
![]() | |
virtual | ~IMessage ()=default |
virtual std::unique_ptr< IMessage > | clone () const =0 |
MessageTypes | type () const |
Return the type of the class 更多... | |
bool | allowSend () const |
检查消息是否可以用于发送 更多... | |
bool | valid () const |
检查消息是否有效 更多... | |
Protected 成员函数 | |
void | clear_ () noexcept |
bool | isValid_ () const override |
![]() | |
IMessageImpl ()=default | |
MessageTypes | GetType_ () const override |
bool | isSendSupported_ () const override |
![]() | |
IMessage ()=default | |
virtual MessageTypes | GetType_ () const =0 |
virtual bool | isSendSupported_ () const =0 |
virtual bool | isValid_ () const =0 |
Protected 属性 | |
MiraiImage | image_ {} |
额外继承的成员函数 | |
![]() | |
static constexpr MessageTypes | GetType () |
static constexpr bool | isSendSupported () |
图片类消息
Middleware for image related messages
在文件 ImageMessage.hpp 第 36 行定义.
|
default |
|
inline |
在文件 ImageMessage.hpp 第 47 行定义.
|
inline |
在文件 ImageMessage.hpp 第 48 行定义.
|
inlineprotectednoexcept |
在文件 ImageMessage.hpp 第 41 行定义.
|
inlineoverrideprotectedvirtual |
实现了 Mirai::IMessage.
在文件 ImageMessage.hpp 第 43 行定义.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
设置图片base64编码
发送图片只需要id、链接、路径、base64编码中的一个,因此该方法会清空其它的属性
base64 | 图片base64编码 |
在文件 ImageMessage.hpp 第 105 行定义.
|
inline |
由 MiraiImage
设置图片内容
在文件 ImageMessage.hpp 第 113 行定义.
|
protected |
在文件 ImageMessage.hpp 第 39 行定义.