mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +00:00
Automatically reconnect to Discord RPC at interval (#996)
* initialize before setActivity
This commit is contained in:
parent
19c8980784
commit
cd2d531c54
3 changed files with 24 additions and 5 deletions
|
|
@ -6,6 +6,11 @@ const initialize = (clientId: string) => {
|
|||
return client;
|
||||
};
|
||||
|
||||
const isConnected = () => {
|
||||
const isConnected = ipcRenderer.invoke('discord-rpc-is-connected');
|
||||
return isConnected;
|
||||
};
|
||||
|
||||
const clearActivity = () => {
|
||||
ipcRenderer.invoke('discord-rpc-clear-activity');
|
||||
};
|
||||
|
|
@ -21,6 +26,7 @@ const quit = () => {
|
|||
export const discordRpc = {
|
||||
clearActivity,
|
||||
initialize,
|
||||
isConnected,
|
||||
quit,
|
||||
setActivity,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue