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:
objectThe client that connects to a
Serverand sends requests to it.- Parameters:
host (
str) – The server address (defaults to127.0.0.1).secret_key (
str| None) – The authentication key used while making requests.standard_port (
int) – The port of the standard server (defaults to1025).multicast_port (
int) – The port of the multicast server (defaults to20000).do_multicast (
bool) – Whether to use the multicast server (enabled by default).timeout (
int| None) – How long each request may take before aServerTimeoutis 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: