File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
import pywhatkit
2
2
import datetime
3
3
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 : " )
6
6
time = input ("Enter Time in (HH:MM) 24-hr format : " )
7
7
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 )
10
10
h = int (time [0 ]+ time [1 ])
11
11
m = int (time [3 ]+ time [4 ])
12
12
if (h < 0 or h > 23 ):
13
- print ("Invalid Input!! " )
14
- exit ()
13
+ print ("Invalid" )
14
+ exit (1 )
15
15
if (m < 0 or m > 59 ):
16
- print ("Invalid Input!! " )
17
- exit ()
16
+ print ("Invalid" )
17
+ exit (1 )
18
18
19
- pywhatkit .sendwhatmsg (f"+91{ num } " , f"{ link } " , h , m )
19
+ pywhatkit .sendwhatmsg (f"+91{ num } " , f"{ msg } " , h , m )
You can’t perform that action at this time.
0 commit comments