add spinners for all commands (including interactive mode).

pass send_command(interpret=True) for commands that return long responses.
note, it strips the first `"` from cvar responses which causes CVAR_REGEX to fail.
This commit is contained in:
2026-03-23 14:45:35 +00:00
parent 3a7cc3eacb
commit d0519bb8e9
11 changed files with 99 additions and 67 deletions

View File

@@ -16,7 +16,12 @@ class Maprotate(Command):
async def run(self):
async with Spinner('Rotating map', suffix='...'):
async with Client(
self.host, self.port, self.password, fragment_read_timeout=1
self.host,
self.port,
self.password,
timeout=3,
fragment_read_timeout=1,
) as client:
if response := await client.send_command('map_rotate'):
console.out.print_response(response)
response = await client.send_command('map_rotate', interpret=True)
console.out.print_response(response)