소스 검색

Split reportbot messages and send line-by-line

master
Chris Smith 6 년 전
부모
커밋
3e4f44a8cd
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 5
    4
      lineandsinker/services/reportbot.py

+ 5
- 4
lineandsinker/services/reportbot.py 파일 보기

11
         self._channel = channel
11
         self._channel = channel
12
 
12
 
13
     def announce(self, message):
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…
취소
저장