aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bot.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bot.py b/bot.py
index 1c77fbc..9455406 100644
--- a/bot.py
+++ b/bot.py
@@ -78,9 +78,10 @@ print(output)
# Prepare the post
-post = output.split('\n')[0]
-if len(post) < 200:
- post = output.split('\n')[0] + '\n' + output.split('\n')[1]
+output = output.split('\n')
+post = output[0]
+if len(post) < 200 and len(output) > 1:
+ post = output[0] + '\n' + output[1]
post = post[:500]