diff --git a/src/components/settings/ConfigPanels/ExternalConfig.tsx b/src/components/settings/ConfigPanels/ExternalConfig.tsx index e0a94d5..b273376 100644 --- a/src/components/settings/ConfigPanels/ExternalConfig.tsx +++ b/src/components/settings/ConfigPanels/ExternalConfig.tsx @@ -38,7 +38,6 @@ const ExternalConfig = ({ bordered }: any) => { { settings.set('discord.enabled', e); dispatch(setDiscord({ ...config.external.discord, enabled: e })); diff --git a/src/hooks/useDiscordRpc.ts b/src/hooks/useDiscordRpc.ts index 2c2e41e..36491a8 100644 --- a/src/hooks/useDiscordRpc.ts +++ b/src/hooks/useDiscordRpc.ts @@ -12,7 +12,7 @@ const useDiscordRpc = ({ playersRef }: any) => { const [discordRpc, setDiscordRpc] = useState(); useEffect(() => { - if (config.external.discord.enabled && config.external.discord.clientId.length === 18) { + if (config.external.discord.enabled) { const client = new RPC.Client({ transport: 'ipc' }); if (discordRpc?.client !== config.external.discord.clientId) { @@ -94,7 +94,7 @@ const useDiscordRpc = ({ playersRef }: any) => { return () => clearInterval(interval); } - return () => clearInterval(); + return () => {}; }, [ config.external.discord.enabled, config.external.discord.serverImage,