()
| 19 | |
| 20 | |
| 21 | def main(): |
| 22 | msg_type = int(input("Enter 1 to send a message to a uSER and 2 to a GROUP: ")) |
| 23 | if msg_type == 1: |
| 24 | phone = input("Enter phone number: ") |
| 25 | if phone[0] == "0": |
| 26 | phone = phone[1::] |
| 27 | while True: |
| 28 | if len(phone) < 9: |
| 29 | raise ValueError("Invalid phone number: ") |
| 30 | else: |
| 31 | break |
| 32 | phone = f"+233{phone}" |
| 33 | elif msg_type == 2: |
| 34 | group = input("Enter group to send message: ") |
| 35 | msg = str(input("Enter message: ")) |
| 36 | hour = int(input("Enter the time in hour: ")) |
| 37 | minute = int(input("Enter the time in minute: ")) |
| 38 | |
| 39 | if msg_type == 1: |
| 40 | send_msg(phone, msg, hour, minute) |
| 41 | elif msg_type == 2: |
| 42 | send_whatmsg_to_group(group, msg, hour, minute) |
| 43 | |
| 44 | |
| 45 | if __name__ == "__main__": |
no test coverage detected