-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathmain.py
91 lines (75 loc) · 3.49 KB
/
main.py
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import os
import argparse
import asyncio
from core.clicker.blum import BlumClicker
from core.logger.logger import logger
from core.config.config import set_config
from core.localization.localization import get_language
AUTOCLICKER_TEXT = """
██████╗░██╗░░░░░██╗░░░██╗███╗░░░███╗ ░█████╗░██╗░░░██╗████████╗░█████╗░
██╔══██╗██║░░░░░██║░░░██║████╗░████║ ██╔══██╗██║░░░██║╚══██╔══╝██╔══██╗
██████╦╝██║░░░░░██║░░░██║██╔████╔██║ ███████║██║░░░██║░░░██║░░░██║░░██║
██╔══██╗██║░░░░░██║░░░██║██║╚██╔╝██║ ██╔══██║██║░░░██║░░░██║░░░██║░░██║
██████╦╝███████╗╚██████╔╝██║░╚═╝░██║ ██║░░██║╚██████╔╝░░░██║░░░╚█████╔╝
╚═════╝░╚══════╝░╚═════╝░╚═╝░░░░░╚═╝ ╚═╝░░╚═╝░╚═════╝░░░░╚═╝░░░░╚════╝░
"""
async def main() -> None:
"""
The main function of the Blum AutoClicker.
This function is responsible for initializing the program, clearing the console,
printing the credits and donation information, and starting the BlumClicker.
:return: None
"""
os.system("cls" if os.name == "nt" else "clear")
print(AUTOCLICKER_TEXT)
print("\033[34m~ " + get_language("CREDITS") + "\033[0m")
print(
"\033[34m~ Telegram: https://t.me/blogbutlazy & https://t.me/chatbutlazy\033[0m"
)
print(
"\033[1;33;48m"
+ get_language("DONATION")
+ "\033[1;37;0m "
+ "UQD2g_C_aIeZ7-zAJ7uOQJUsr538vPcd_GljLeA-iRZL7tzF\n"
)
clicker = BlumClicker()
await clicker.run()
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="BAC (Blum Auto Clicker)")
parser.add_argument(
"--lang",
"--setlang",
type=str,
help="Set language for the programm (e.g., --lang ua)",
)
parser.add_argument(
"--replays",
"--max-replays",
"--tickets",
type=int,
help="Set the maximum number of replays (e.g., --replays 50)",
)
parser.add_argument(
"--delay",
"--replay-delay",
type=int,
help="Set the delay between replays in seconds (e.g., --delay 5)",
)
parser.add_argument(
"--refresh",
type=int,
help="Set the number of games between refresh (e.g., --refresh 10)",
)
args = parser.parse_args()
config_mapping = {
"lang": ("LANGUAGE", args.lang),
"replays": ("REPLAYS", args.replays),
"delay": ("REPLAY_DELAY", args.delay),
"refresh": ("GAMES_BETWEEN_REFRESH", args.refresh),
}
for arg, (config_key, config_value) in config_mapping.items():
set_config(config_key, config_value) if config_value else None
try:
asyncio.run(main())
except KeyboardInterrupt:
logger.error("Exited due to keyboard interrupt.")