Browse Source

Split reportbot messages and send line-by-line

master
Chris Smith 5 years ago
parent
commit
3e4f44a8cd
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      lineandsinker/services/reportbot.py

+ 5
- 4
lineandsinker/services/reportbot.py View File

@@ -11,7 +11,8 @@ class ReportBot(Service):
11 11
         self._channel = channel
12 12
 
13 13
     def announce(self, message):
14
-        requests.post(
15
-            self._url,
16
-            {"key": self._key, "command": f"CM {self._channel}", "args": message},
17
-        )
14
+        for line in message.split("\n"):
15
+            requests.post(
16
+                self._url,
17
+                {"key": self._key, "command": f"CM {self._channel}", "args": line},
18
+            )

Loading…
Cancel
Save