feat: add support for source 2

This commit is contained in:
2023-10-22 19:33:42 +02:00
parent 24e44a346d
commit 14ace4cd49
6 changed files with 106 additions and 59 deletions

View File

@@ -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;
},