16#ifndef MIRAI_FACE_MESSAGE_HPP_
17#define MIRAI_FACE_MESSAGE_HPP_
31template <
class Message>
38 bool isValid_()
const override {
return this->id_ != -1 || !this->
name_.empty(); }
59 return *
static_cast<Message*
>(
this);
66 this->
name_ = std::move(name);
67 return *
static_cast<Message*
>(
this);
std::string GetName() const
获取表情名称
bool isValid_() const override
FaceMessageImpl(std::string name)
int64_t GetId() const
获取表情id
Message & SetId(int64_t id)
设置表情id
Message & SetName(std::string name)
设置表情名称。这一操作会清除已设置的id。
bool operator!=(const FaceMessageImpl &rhs)
FaceMessageImpl(int64_t id)
FaceMessageImpl()=default
bool operator==(const FaceMessageImpl &rhs)
static constexpr MessageTypes TYPE_
static constexpr bool SUPPORT_SEND_
static constexpr bool SUPPORT_SEND_
bool isValid_() const final
static constexpr MessageTypes TYPE_