node-gamedig/protocols/palworld.js
Sebastian Schmidt 46db10fcc7
: Incorrect numplayers on Palworld (#508)
* Fix: Palworld results - Name of the server is empty

* #497 - refactor of feedback

* #497 - refactor of feedback from Cosmin

* Fix for current-players bug - #491 and #507

* Fix for current-players bug - #491 and #507 - added changelog
2024-01-24 15:18:05 +02:00

19 lines
543 B
JavaScript

import Epic from './epic.js'
export default class palworld extends Epic {
constructor () {
super()
// OAuth2 credentials extracted from Palworld files.
this.clientId = 'xyza78916PZ5DF0fAahu4tnrKKyFpqRE'
this.clientSecret = 'j0NapLEPm3R3EOrlQiM8cRLKq3Rt02ZVVwT0SkZstSg'
this.deploymentId = '0a18471f93d448e2a1f60e47e03d3413'
this.authByExternalToken = true
}
async run (state) {
await super.run(state)
state.name = state.raw.attributes.NAME_s
state.numplayers = state.raw.attributes.PLAYERS_l
}
}