From a0599ab812280c74fdeb6b622bf9701f10d659ea Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Sun, 20 Feb 2022 01:19:18 -0500 Subject: parse role mentions --- src/discord/role.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/discord/role.cpp') 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); +} -- cgit v1.2.3