mirror of
https://github.com/Sithranduil/srcds_exporter.git
synced 2025-07-23 08:28:00 +02:00
feat: add support for source 2
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { TimeoutError } from 'working-rcon';
|
||||
import got from 'got';
|
||||
import jsdom from 'jsdom';
|
||||
|
||||
@@ -22,13 +21,9 @@ export default {
|
||||
},
|
||||
async rconCommand(client, command) {
|
||||
try {
|
||||
return client.command(command);
|
||||
return client.send(command);
|
||||
} catch (err) {
|
||||
if (err instanceof TimeoutError) {
|
||||
console.error('request timed out');
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
Reference in New Issue
Block a user