Pārlūkot izejas kodu

Tweak print logic

Kirk Trombley 4 gadi atpakaļ
vecāks
revīzija
7801dc1cee
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      drivers/command_driver.py

+ 2 - 1
drivers/command_driver.py

@@ -32,7 +32,8 @@ class TerminalBot(rollbot.Rollbot[str]):
         )
 
     async def respond(self, res):
-        print(res.text, flush=True)
+        if res.text is not None:
+            print(res.text, flush=True)
         for att in res.attachments:
             print(f"Attached: {att.name}", flush=True)