From e0dbd0ec8e64a8396134282afae2cd67b04d15fc Mon Sep 17 00:00:00 2001 From: Dnns <invisiblee@arcor.de> Date: Mon, 20 Apr 2020 20:57:37 +0200 Subject: [PATCH] Changed Color roles to be generic. All roles, that start with "Farbe-" are treated as color roles --- fernuni-bot.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/fernuni-bot.py b/fernuni-bot.py index 6e5e896..62c94e2 100644 --- a/fernuni-bot.py +++ b/fernuni-bot.py @@ -38,18 +38,8 @@ def get_key(role): return "MM" elif role.name == "M.Sc. Wirtschaftsinformatik": return "MWI" - elif role.name == "Pink": - return "PNK" - elif role.name == "Türkis": - return "TKS" - elif role.name == "Orange": - return "ONG" - elif role.name == "Lila": - return "LLA" - elif role.name == "Grün": - return "GRN" - elif role.name == "Blau": - return "BLU" + elif role.name.startswith("Farbe-"): + return role.name[6:9] # Get all roles that are available at the guild. -- GitLab