mirror of
https://github.com/nichkara/InfinitumBotty.git
synced 2026-06-10 22:26:23 +02:00
modmail f-string + only react when startswith.
This commit is contained in:
@@ -12,10 +12,9 @@ class ModmailObserver(PrivMsgObserverPrototype):
|
||||
return ".modmail <msg> - Sendet allen Moderatoren <msg> 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}")
|
||||
|
||||
Reference in New Issue
Block a user