Skip to content

Commit

Permalink
Return setRPC promise in update
Browse files Browse the repository at this point in the history
  • Loading branch information
n1ckoates committed Sep 15, 2024
1 parent 9817605 commit 9598f92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/DiscordRPC/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ export function update(data?: {
formatString(track.artists?.map((a) => a.name).join(", ")) ??
"Unknown Artist";

setRPC(activity);
return setRPC(activity);
}

function setRPC(activity?: SetActivity) {
window.electron.ipcRenderer
return window.electron.ipcRenderer
.invoke("DISCORD_SET_ACTIVITY", activity)
.catch(trace.err.withContext("Failed to set activity"));
}
Expand Down

0 comments on commit 9598f92

Please sign in to comment.