Skip to main content
Module

x/discord_rpc_deno/mod.ts>Client#subscribe

port of @xhayper/discord-rpc to deno
Go to Latest
method Client.prototype.subscribe
Re-export
import { Client } from "https://deno.land/x/discord_rpc_deno@1.0.9/mod.ts";

Used to subscribe to events. evt of the payload should be set to the event being subscribed to. args of the payload should be set to the args needed for the event.

Parameters

event: Exclude<RPC_EVT, "READY" | "ERROR">

event name now subscribed to

optional
args: any

args for the event

Returns

Promise<{ unsubscribe: () => void; }>

an object to unsubscribe from the event