diff options
author | Anthony Wang | 2022-03-23 15:50:56 -0500 |
---|---|---|
committer | Anthony Wang | 2022-03-23 15:50:56 -0500 |
commit | fc56d2c0a873945e0b5f8720f3f75fd02c0c1602 (patch) | |
tree | 2b30af1ce6da5aa8cf19d76834bb94f13308cf89 | |
parent | 3de96f721a228b5059904aca9436b43f40723029 (diff) |
Make sure output has multiple lines if post isn't long enough
-rw-r--r-- | bot.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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] |