From f5a723d9b491005ec5dd9377802e5d143100e346 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Thu, 4 Feb 2021 10:25:41 +0100 Subject: Merge branch 'master' of https://github.com/discord-open-source/discord-gateway into main --- client.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 client.js (limited to 'client.js') diff --git a/client.js b/client.js new file mode 100644 index 00000000..7e8c6d5c --- /dev/null +++ b/client.js @@ -0,0 +1,16 @@ +const WebSocket = require("ws"); + +const ws = new WebSocket("ws://127.0.0.1:8080"); + +ws.on("open", () => { + ws.send(JSON.stringify({ req_type: "new_auth" })); + // ws.send(JSON.stringify({ req_type: "check_auth", token: "" })); + // op: 0, + // d: {}, + // s: 42, + // t: "GATEWAY_EVENT_NAME", +}); + +ws.on("message", (data) => { + console.log(data); +}); -- cgit 1.5.1