From 4eb40f1ab51aeebe45c2ac2336a0ea1457f37fb0 Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Wed, 5 Jun 2024 00:06:13 -0500 Subject: [PATCH] Multi-line support (\n) --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index b3d0d50..98e7086 100644 --- a/main.py +++ b/main.py @@ -94,7 +94,7 @@ if __name__ == "__main__": ) try: while 1: - msg = input("[THREAD] Message (Raw text, not blocks)") + msg = input("[THREAD] Message (Raw text, not blocks)").replace("\\n", "\n") try: client.chat_postMessage( channel=chan, text=msg, thread_ts=ts @@ -106,7 +106,7 @@ if __name__ == "__main__": print() if ts: continue - msg = input("[CHANNEL] Message (Raw text, not blocks)") + msg = input("[CHANNEL] Message (Raw text, not blocks)").replace("\\n", "\n") try: client.chat_postMessage(channel=chan, text=msg) print("Message sent (to the channel)!")