Compare commits
No commits in common. "6bcce04b72b959a601d137984d495fc4bb76d90f" and "22815e74b6f8f89d70e9d6d2b3d377a00554d5b2" have entirely different histories.
6bcce04b72
...
22815e74b6
@ -2,10 +2,7 @@ const DiscordRPC = require("discord-auto-rpc");
|
||||
const { appName, appVersion } = require("./appInfo.js");
|
||||
|
||||
const clientId = "1032772293220384808";
|
||||
|
||||
/** @type {DiscordRPC.AutoClient} */
|
||||
let richPresence;
|
||||
|
||||
let intervalId;
|
||||
|
||||
let currentStatus = {
|
||||
@ -35,7 +32,6 @@ module.exports = {
|
||||
richPresence = new DiscordRPC.AutoClient({ transport: "ipc" });
|
||||
richPresence.endlessLogin({ clientId });
|
||||
richPresence.once("ready", () => {
|
||||
console.log("connected presence with user " + richPresence.user.username);
|
||||
richPresence.setActivity(currentStatus);
|
||||
intervalId = setInterval(() => {
|
||||
richPresence.setActivity(currentStatus);
|
||||
@ -61,7 +57,7 @@ module.exports = {
|
||||
currentStatus.smallImageText = osuVersion ? `osu! ${osuVersion}` : " ";
|
||||
},
|
||||
update: () => {
|
||||
if (richPresence && richPresence.user) {
|
||||
if (richPresence) {
|
||||
richPresence.setActivity(currentStatus);
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user