17 type(type), offset(offset), length(length)
20 if(type.compare(
"mention")){}
21 else if(type.compare(
"hashtag")){}
22 else if(type.compare(
"bot_command")){}
23 else if(type.compare(
"url")){}
24 else if(type.compare(
"email")){}
25 else if(type.compare(
"bold")){}
26 else if(type.compare(
"italic")){}
27 else if(type.compare(
"code")){}
28 else if(type.compare(
"pre")){}
29 else if(type.compare(
"text_link")){}
30 else if(type.compare(
"text_mention")){}
39 type(MessageEntity.type), offset(MessageEntity.offset), length(MessageEntity.length)
51 if(type.compare(
"text_link")){
55 throw essential_key_missing(
"For setting MessageEntity::url in MessageEntity::type::"+type+
" is missing text_link");
61 if(type.compare(
"text_mention”")){
65 throw essential_key_missing(
"For setting MessageEntity::user in MessageEntity::type::"+type+
" is missing text_mention");
std::int32_t getOffset() const
const std::optional< std::string > & getUrl() const
const std::optional< User > & getUser() const
MessageEntity(std::string type, std::int32_t offset, std::int32_t length)
std::optional< std::string > url
void setUrl(const std::optional< std::string > &url)
void setUser(const std::optional< User > &user)
std::optional< User > user
const std::string & getType() const
std::int32_t getLength() const