From fc56d2c0a873945e0b5f8720f3f75fd02c0c1602 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Wed, 23 Mar 2022 15:50:56 -0500 Subject: Make sure output has multiple lines if post isn't long enough --- bot.py | 7 ++++--- 1 file 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] -- cgit v1.2.3-70-g09d2