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
8
index.js
8
index.js
|
@ -74,6 +74,10 @@ function update() {
|
||||||
startTime = Date.now()
|
startTime = Date.now()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (json.name == "nothing") {
|
||||||
|
client.clearActivity()
|
||||||
|
updateTime = (process.env.UPDATE_TIME || 45) * 2.5
|
||||||
|
} else {
|
||||||
client.setActivity({
|
client.setActivity({
|
||||||
details: `Playing ${json.name}`,
|
details: `Playing ${json.name}`,
|
||||||
state: json.presence,
|
state: json.presence,
|
||||||
|
@ -83,10 +87,6 @@ function update() {
|
||||||
smallImageText: json.username,
|
smallImageText: json.username,
|
||||||
smallImageKey: json.pfp || null,
|
smallImageKey: json.pfp || null,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (json.gameName == "nothing") {
|
|
||||||
updateTime = (process.env.UPDATE_TIME || 45) * 2.5
|
|
||||||
} else {
|
|
||||||
updateTime = (process.env.UPDATE_TIME || 45)
|
updateTime = (process.env.UPDATE_TIME || 45)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue