From 328eec0cd4fff00f19e734cc7e9b54124ab44cf5 Mon Sep 17 00:00:00 2001 From: destruc7i0n <6181960+destruc7i0n@users.noreply.github.com> Date: Fri, 24 Dec 2021 17:51:26 -0500 Subject: updated to discord.js v13 (#77) * updated to discord.js v13 * update loading of config * updated debug lines * rcon cleanup * more code cleanup * bump version * message about node.js requirement Co-authored-by: destruc7i0n --- src/Rcon.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Rcon.ts') diff --git a/src/Rcon.ts b/src/Rcon.ts index 180ad38..fc3b989 100644 --- a/src/Rcon.ts +++ b/src/Rcon.ts @@ -55,7 +55,7 @@ class Rcon { } public async auth (password: string): Promise { - if (this.authed) { throw new Error('Already authed') } + if (this.authed) throw new Error('Already authed') if (this.connected){ try { @@ -88,7 +88,7 @@ class Rcon { const id = this.nextId this.nextId++ - if (!this.connected) { throw new Error('Cannot send package while not connected') } + if (!this.connected) throw new Error('Cannot send package while not connected') const length = 14 + payload.length const buff = Buffer.alloc(length) -- cgit 1.4.1