fixes and update simplyapi
This commit is contained in:
parent
4728714d72
commit
7e34599116
2 changed files with 4 additions and 6 deletions
|
|
@ -240,7 +240,7 @@ async function updateCustomStatus(member) {
|
|||
//Too many requests
|
||||
console.warn("::SimplyWS:: Too many requests, waiting to try again.")
|
||||
setTimeout(function () {
|
||||
await updateCustomStatus(member)
|
||||
updateCustomStatus(member)
|
||||
}, 1000)
|
||||
return
|
||||
})
|
||||
|
|
@ -255,7 +255,6 @@ async function updateCustomStatus(member) {
|
|||
|
||||
const transform = require('lodash.transform')
|
||||
const isEqual = require('lodash.isequal')
|
||||
const isArray = require('lodash.isarray')
|
||||
const isObject = require('lodash.isobject')
|
||||
async function calculateDiff(origObj, newObj) {
|
||||
return new Promise(function (resolve) {
|
||||
|
|
@ -263,7 +262,7 @@ async function calculateDiff(origObj, newObj) {
|
|||
let arrayIndexCounter = 0
|
||||
return transform(newObj, function (result, value, key) {
|
||||
if (!isEqual(value, origObj[key])) {
|
||||
let resultKey = isArray(origObj) ? arrayIndexCounter++ : key
|
||||
let resultKey = Array.isArray(origObj) ? arrayIndexCounter++ : key
|
||||
result[resultKey] = (isObject(value) && isObject(origObj[key])) ? changes(value, origObj[key]) : value
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Compatiplural",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.0",
|
||||
"description": "SimplyPlural -> PluralKit Connectivity",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
@ -15,11 +15,10 @@
|
|||
"async": "^3.2.3",
|
||||
"axios": "^0.26.0",
|
||||
"dotenv": "^16.0.0",
|
||||
"lodash.isarray": "^4.0.0",
|
||||
"lodash.isequal": "^4.5.0",
|
||||
"lodash.isobject": "^3.0.2",
|
||||
"lodash.transform": "^4.6.0",
|
||||
"simplyapi": "^0.1.3",
|
||||
"simplyapi": "^0.1.4",
|
||||
"ws": "^8.5.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue