New value to specify if lanyard update was caused by activity changes or not
This commit is contained in:
parent
a840f6ded3
commit
b96a5577c5
1 changed files with 5 additions and 1 deletions
4
index.js
4
index.js
|
@ -15,6 +15,8 @@ var pfpSeason = "default"
|
|||
|
||||
var violetSpins = 0
|
||||
|
||||
var lastActivity
|
||||
|
||||
var configPath = path.join(__dirname, "config")
|
||||
if (!fs.existsSync(configPath)) {
|
||||
fs.mkdirSync(configPath)
|
||||
|
@ -104,6 +106,8 @@ function socketeer() {
|
|||
} else if (data.op == 0) {
|
||||
lanyardData = data
|
||||
lanyardData.d.socials = JSON.parse(fs.readFileSync(path.join(configPath, "socials.json")))
|
||||
lanyardData.d.activityChanged = lastActivity != JSON.stringify(lanyardData.d.activities)
|
||||
lastActivity = JSON.stringify(lanyardData.d.activities)
|
||||
|
||||
for (let index = 0; index < sockets.length; index++) {
|
||||
var socketData = sockets[index]
|
||||
|
|
Loading…
Reference in a new issue