mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 04:52:50 +08:00
Silent failure: logs showed "Client properties updated" / "Description updated" / "Avatar updated" even though the bot's nickname never changed and the avatar stayed as "loading image" on clients. Root causes: - TS6HttpQuery.clientUpdate ignored non-2xx responses, so 400 (bad parameter) and 403 (insufficient permission) were reported as success. - updateClientProperties built TS3-escaped strings (\\s for space) then split them back into JSON props, so TS6 received literal backslashes and rejected the nickname silently. - handleFeatureError only matched textual "permission" errors; HTTP 4xx statuses weren't recognised and the feature retried every song. - doAvatarUpload had no per-step logging, making it impossible to tell whether a broken avatar came from init, the TCP 30033 transfer, or the client_flag_avatar command. Fixes: - Add HttpQueryError (status/body/path); clientUpdate throws on non-2xx. - Build a raw property map in updateClientProperties; escape only on the TS3 wire path. - Log HTTP status and updated prop names on success. - handleFeatureError now treats HTTP 400/401/403 as unrecoverable. - Debug-log each step of doAvatarUpload plus bytes/elapsedMs on success. https://claude.ai/code/session_018NrpGWbQQTrahUVXyea5Jy