From ad4f03c8417c386d46272f3fb4117d6736144fcd Mon Sep 17 00:00:00 2001 From: Sean Corrigan Date: Thu, 24 Dec 2020 15:29:00 -0500 Subject: [PATCH] fixing comma issue, and newline --- PIcontroller.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/PIcontroller.py b/PIcontroller.py index bf019f5..5db4119 100644 --- a/PIcontroller.py +++ b/PIcontroller.py @@ -16,16 +16,17 @@ def listfromAPI(message): queueList.append(mess[1:]) queueList.append(mess) # fixcomma = queueList[0].split() - queueList[0] = "".join(queueList[0][:-1]) + queueList[0] = queueList[0][:-2] print(queueList[0]) return queueList -def fixformatting(message): - try: +## this may need to be rewritten kinda buggy +def fixformatting(message): + try: fixedmessage = [""] counter = 0 for word in message.split(" "): - if counter + len(word) >= 20: + if counter + len(word) >= 25: counter = 0 fixedmessage.append("\n") fixedmessage.append("{} ".format(word))