Skip to content

Commit

Permalink
fix: discord activity
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Jan 25, 2024
1 parent cc6d746 commit 2c38d1f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions electron/events/discord.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
const { ipcMain } = require("electron");
const { register, Client } = require("discord-rpc");

const clientId = "1166773524380274788";
register(clientId);
try {
const clientId = "1166773524380274788";
register(clientId);

const rpc = new Client({ transport: "ipc" });
rpc.login({ clientId }).catch(console.error);
const rpc = new Client({ transport: "ipc" });
rpc.login({ clientId }).catch(() => {});
} catch (e) {
// Поебать
}

ipcMain.on("discord/changeActivity", (event, file) => {
queueMicrotask(async () => {
Expand Down

0 comments on commit 2c38d1f

Please sign in to comment.