fix: event listener accumulation from rpc client (#26)
This commit is contained in:
parent
6817b554e5
commit
96fa8cc647
|
|
@ -8,6 +8,9 @@ let rpc: Client;
|
|||
export async function initDiscordRpc() {
|
||||
if (!config.discordRpc) return;
|
||||
|
||||
// clean up existing client if one exists
|
||||
rpc?.removeAllListeners();
|
||||
|
||||
try {
|
||||
rpc = new Client({ transport: "ipc" });
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue