New value to specify if lanyard update was caused by activity changes or not

This commit is contained in:
bingus_violet 2024-06-25 01:22:17 -05:00
parent a840f6ded3
commit b96a5577c5

View file

@ -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]