Skip to content

Commit eae5b44

Browse files
authored
Merge pull request Shahrayar123#2 from RohitSgh/patch-1
Update main.py
2 parents a07a604 + 754558b commit eae5b44

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

SchduledMessageWhatsApp/main.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import pywhatkit
22
import datetime
33

4-
num = input("Enter sender's Whatsapp number without your country code : ")
5-
link = input("Enter Your Message : ")
4+
num = input("Enter WhatsApp Number of Sender (without Country Code) : ")
5+
msg = input("Enter Your Message : ")
66
time = input("Enter Time in (HH:MM) 24-hr format : ")
77
if len(time) != 5:
8-
print("Invalid Input!!")
9-
exit()
8+
print("Invalid. Please make sure HH:MM format is followed, without any extra space (include only 5 characters)")
9+
exit(1)
1010
h = int(time[0]+time[1])
1111
m = int(time[3]+time[4])
1212
if (h<0 or h>23):
13-
print("Invalid Input!!")
14-
exit()
13+
print("Invalid")
14+
exit(1)
1515
if (m<0 or m>59):
16-
print("Invalid Input!!")
17-
exit()
16+
print("Invalid")
17+
exit(1)
1818

19-
pywhatkit.sendwhatmsg(f"+91{num}", f"{link}", h, m)
19+
pywhatkit.sendwhatmsg(f"+91{num}", f"{msg}", h, m)

0 commit comments

Comments
 (0)