Closed Dr3nz4r closed 4 months ago
What is your goal? Are you expecting the server's response to include either the server's password or a list of users with admin rights on the server?
If that's the case, it's important to realize that GameDig relies entirely on the server's response. It's highly unlikely that any server would include its password in a response that's accessible. However, for retrieving a list of admins, you can refer to the state.raw
attribute. Some servers may include one.
Should you wish to introduce custom fields, you can do so in a straightforward manner. Below is an example from a Discord bot I developed (ofc it will not work without the prior code):
let game: any = await GameDig.query({
type: gameObject.type,
host: gameObject.ip,
port: gameObject.port,
});
game.raw!.test = "test";
console.log(game.raw);
It will look something like:
{
... game response ...
test: 'test'
}
If I misunderstood you, please say so :) You are welcome
No I think you got it spot on. I think I just didn't find the custom field part thx!
What is this feature about? I'd like to add additional info (like a server PW/admin list) to the embeds in e.g. discord