Client API Reference

class kxspy.client.Client(ws_url: str = 'wss://network.kxs.rip/', rest_url: str = 'https://network.kxs.rip', username: str = 'kxspy_404a1113b6', enablevoicechat: bool = False, exchangekey: str = None, isMobile: bool = False, isSecure: bool = True, admin_key: str = None, connect: bool = True, session: ClientSession | None = None)[source]

Bases: object

The main class.

add_event_hooks(obj)[source]

Scans the provided class obj for functions decorated with listener(), and sets them up to process Lavalink events.

remove_event_hooks(obj: Any)[source]

Removes all previously registered listeners for an object.

async connect()[source]

Connect to Kxs Network.

async close()[source]

Close connection to Kxs Network.

async join_game(gameId)[source]

Join a game by its ID.

async leave_game()[source]

Leave the current game.

async report_kill(killer: str, killed: str)[source]

Report a kill in the game

async check_version()[source]

Check for the latest version of Kxs

async send_message(text: str)[source]

Send a message to the in-game chat

async update_voicechat(isVoiceChat: bool)[source]

Update the voice chat status

async send_voicedata(audio_data: bytes | bytearray | ndarray | List[int], user_id: str | None = None)[source]

Update the voice chat status

async ws_latency()[source]

Send the latency of websocket