From 0bf84250b3bf37320b61ea8ef46f8dcb9a3d421d Mon Sep 17 00:00:00 2001 From: what <74026992+all-other-usernames-were-taken@users.noreply.github.com> Date: Wed, 6 Oct 2021 06:58:04 -0700 Subject: [PATCH] give name of role mentions --- src/irc_link.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/irc_link.py b/src/irc_link.py index 14e6698..948823b 100644 --- a/src/irc_link.py +++ b/src/irc_link.py @@ -29,6 +29,8 @@ def render_formatting(message): out += f"@{random_color(seg['id'])}{seg['name']}{color_code('')}" elif kind == "channel_mention": # these appear to be clickable across servers/guilds out += f"#{seg['name']}" + elif kind == "role_mention": + out += f"@{random_color(seg['id'])}{seg['name']}{color_code('')}" else: logging.warn("Unrecognized message seg %s", kind) return out.strip()