From 7b0a45b3dc3674b9c8ed76dbb923fe8653a5ffba Mon Sep 17 00:00:00 2001 From: Harsh Master Date: Wed, 15 Mar 2023 09:38:18 +0530 Subject: [PATCH] #267 Issue: Update whats.py The input 'wait_time - 4' for time.sleep() function on line 38 was causing a problem as for wait_time <4 it will be a negative value which is not accepted by time.sleep() function. --- pywhatkit/whats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pywhatkit/whats.py b/pywhatkit/whats.py index 72dc831..f1cfee4 100755 --- a/pywhatkit/whats.py +++ b/pywhatkit/whats.py @@ -35,7 +35,7 @@ def sendwhatmsg_instantly( web.open(f"https://web.whatsapp.com/send?phone={phone_no}&text={quote(message)}") time.sleep(4) pg.click(core.WIDTH / 2, core.HEIGHT / 2 + 15) - time.sleep(wait_time - 4) + time.sleep(wait_time) core.findtextbox() pg.press("enter") log.log_message(_time=time.localtime(), receiver=phone_no, message=message)