Multi-line support (\n)
This commit is contained in:
parent
b9ac4faef0
commit
4eb40f1ab5
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
@ -94,7 +94,7 @@ if __name__ == "__main__":
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
while 1:
|
while 1:
|
||||||
msg = input("[THREAD] Message (Raw text, not blocks)")
|
msg = input("[THREAD] Message (Raw text, not blocks)").replace("\\n", "\n")
|
||||||
try:
|
try:
|
||||||
client.chat_postMessage(
|
client.chat_postMessage(
|
||||||
channel=chan, text=msg, thread_ts=ts
|
channel=chan, text=msg, thread_ts=ts
|
||||||
|
@ -106,7 +106,7 @@ if __name__ == "__main__":
|
||||||
print()
|
print()
|
||||||
if ts:
|
if ts:
|
||||||
continue
|
continue
|
||||||
msg = input("[CHANNEL] Message (Raw text, not blocks)")
|
msg = input("[CHANNEL] Message (Raw text, not blocks)").replace("\\n", "\n")
|
||||||
try:
|
try:
|
||||||
client.chat_postMessage(channel=chan, text=msg)
|
client.chat_postMessage(channel=chan, text=msg)
|
||||||
print("Message sent (to the channel)!")
|
print("Message sent (to the channel)!")
|
||||||
|
|
Loading…
Reference in a new issue