diff --git a/deno.json b/deno.json index 77120fb..b47c433 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@meower/api-client", - "version": "1.0.0-rc.2", + "version": "1.0.0-rc.3", "exports": "./src/index.ts", "fmt": { "lineWidth": 80, diff --git a/src/api/socket.ts b/src/api/socket.ts index 78ee697..9b3db12 100644 --- a/src/api/socket.ts +++ b/src/api/socket.ts @@ -58,14 +58,6 @@ export class socket extends EventEmitter<{ private setup() { this.emit('socket_open'); - this.send({ - 'cmd': 'authpswd', - 'val': { - 'username': this.opts.username, - 'pswd': this.opts.api_token - } - }) - this.send({ 'cmd': 'direct', 'val': { @@ -74,6 +66,14 @@ export class socket extends EventEmitter<{ }, }); + this.send({ + 'cmd': 'authpswd', + 'val': { + 'username': this.opts.username, + 'pswd': this.opts.api_token + } + }) + setInterval(() => { if (this.socket.readyState === 1) { this.send({