diff options
Diffstat (limited to 'src/discord/role.cpp')
-rw-r--r-- | src/discord/role.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/discord/role.cpp b/src/discord/role.cpp index 07a912e..8a9ed50 100644 --- a/src/discord/role.cpp +++ b/src/discord/role.cpp @@ -12,3 +12,11 @@ void from_json(const nlohmann::json &j, RoleData &m) { JS_D("managed", m.IsManaged); JS_D("mentionable", m.IsMentionable); } + +bool RoleData::HasColor() const noexcept { + return Color != 0; +} + +Glib::ustring RoleData::GetEscapedName() const { + return Glib::Markup::escape_text(Name); +} |