MCPcopy Create free account
hub / github.com/HiddenCodeDevs/BlumTelegramBot / main

Function main

main.py:10–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9
10async def main() -> None:
11 parser = ArgumentParser()
12 parser.add_argument("-a", "--action", type=int, help="Action to perform")
13 print(start_text)
14 logger.info(f"Detected {len(get_session_names())} sessions | {len(get_proxies())} proxies")
15
16 action = parser.parse_args().action
17
18 actions = {
19 1: run_tasks,
20 2: register_sessions
21 }
22
23 if not action:
24 print(f"Select an action:\n 1. Run clicker\n 2. Create session")
25 while True:
26 action = input("> ")
27 if not action.isdigit():
28 logger.warning("<red>Action must be number</red>")
29 elif int(action) not in actions:
30 logger.warning("<red>Action must be <cyan>1</cyan> or <cyan>2</cyan></red>")
31 else:
32 action = int(action)
33 break
34
35 await actions[action]()
36
37if __name__ == '__main__':
38 try:

Callers 1

main.pyFile · 0.85

Calls 2

get_session_namesFunction · 0.90
get_proxiesFunction · 0.90

Tested by

no test coverage detected