-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
27 lines (23 loc) · 753 Bytes
/
main.py
File metadata and controls
27 lines (23 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from bot import spammer
def print_line(length: int) -> None:
# Prints a line of dashes.
print("-" * length, end="")
def title()-> None:
print("\t -----------------")
print("\t| Chat SpamBot |")
print("\t -----------------")
def main() -> None:
# Main function to get user input and call the spammer function.
print_line(50)
print() # Move to the next line after the line of dashes
title()
print()
try:
message = input("Enter the message you want to spam: ")
number_of_times = int(input("How many times: "))
spammer(message=message, n=number_of_times)
except ValueError:
print("Please enter a valid number.")
print_line(50)
if __name__ == "__main__":
main()