fix: event listener accumulation from rpc client (#26)

This commit is contained in:
Paul Makles 2025-12-29 18:47:33 +01:00 committed by GitHub
parent 6817b554e5
commit 96fa8cc647
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -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" });