diff --git a/FaustBot/Modules/CustomUserModules/ModmailObserver.py b/FaustBot/Modules/CustomUserModules/ModmailObserver.py index c38aabb..060ea9b 100644 --- a/FaustBot/Modules/CustomUserModules/ModmailObserver.py +++ b/FaustBot/Modules/CustomUserModules/ModmailObserver.py @@ -12,10 +12,9 @@ class ModmailObserver(PrivMsgObserverPrototype): return ".modmail - Sendet allen Moderatoren per PN" def update_on_priv_msg(self, data, connection: Connection): - if data['message'].find('.modmail') == -1: - return - mods = connection.details.get_mods() - print(mods) - message = data['message'].split('.modmail ')[1] - for mod in mods: - connection.send_to_user(mod, data['nick'] + ' meldet: ' + message) + if data["message"].startswith(".modmail"): + mods = connection.details.get_mods() + print(mods) + message = data["message"].split(".modmail ")[1] + for mod in mods: + connection.send_to_user(mod, f"{data['nick']} meldet: {message}")