Now hides when not playing a game
This commit is contained in:
parent
52cc72f94c
commit
8898714c62
1 changed files with 11 additions and 11 deletions
22
index.js
22
index.js
|
@ -73,20 +73,20 @@ function update() {
|
||||||
prevGame = json.name
|
prevGame = json.name
|
||||||
startTime = Date.now()
|
startTime = Date.now()
|
||||||
}
|
}
|
||||||
|
|
||||||
client.setActivity({
|
|
||||||
details: `Playing ${json.name}`,
|
|
||||||
state: json.presence,
|
|
||||||
startTimestamp: startTime,
|
|
||||||
largeImageText: json.name,
|
|
||||||
largeImageKey: json.img || null,
|
|
||||||
smallImageText: json.username,
|
|
||||||
smallImageKey: json.pfp || null,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (json.gameName == "nothing") {
|
if (json.name == "nothing") {
|
||||||
|
client.clearActivity()
|
||||||
updateTime = (process.env.UPDATE_TIME || 45) * 2.5
|
updateTime = (process.env.UPDATE_TIME || 45) * 2.5
|
||||||
} else {
|
} else {
|
||||||
|
client.setActivity({
|
||||||
|
details: `Playing ${json.name}`,
|
||||||
|
state: json.presence,
|
||||||
|
startTimestamp: startTime,
|
||||||
|
largeImageText: json.name,
|
||||||
|
largeImageKey: json.img || null,
|
||||||
|
smallImageText: json.username,
|
||||||
|
smallImageKey: json.pfp || null,
|
||||||
|
});
|
||||||
updateTime = (process.env.UPDATE_TIME || 45)
|
updateTime = (process.env.UPDATE_TIME || 45)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue