Client

class discord.ext.ipc.Client(host='127.0.0.1', secret_key=None, standard_port=1025, multicast_port=20000, do_multicast=True, timeout=None)

Bases: object

The client that connects to a Server and sends requests to it.

Parameters:
  • host (str) – The server address (defaults to 127.0.0.1).

  • secret_key (str | None) – The authentication key used while making requests.

  • standard_port (int) – The port of the standard server (defaults to 1025).

  • multicast_port (int) – The port of the multicast server (defaults to 20000).

  • do_multicast (bool) – Whether to use the multicast server (enabled by default).

  • timeout (int | None) – How long each request may take before a ServerTimeout is raised.

async request(endpoint, **kwargs)

Make a request to a server endpoint.

Parameters:
  • endpoint (str) – The endpoint to call on the server.

  • **kwargs (Any) – The data to send to the endpoint.

Return type:

ServerResponse