🎨 restructure
This commit is contained in:
parent
43ce48e7c6
commit
61cd85b7ed
1
.gitignore
vendored
1
.gitignore
vendored
@ -102,3 +102,4 @@ dist
|
|||||||
|
|
||||||
# TernJS port file
|
# TernJS port file
|
||||||
.tern-port
|
.tern-port
|
||||||
|
.DS_Store
|
||||||
BIN
package-lock.json
generated
BIN
package-lock.json
generated
Binary file not shown.
46
package.json
46
package.json
@ -1,22 +1,28 @@
|
|||||||
{
|
{
|
||||||
"name": "websocket_learn",
|
"name": "discord-gateway",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
},
|
"build": "tsc -b .",
|
||||||
"keywords": [],
|
"start": "npm run build && node dist/"
|
||||||
"author": "",
|
},
|
||||||
"license": "ISC",
|
"keywords": [],
|
||||||
"dependencies": {
|
"author": "",
|
||||||
"lambert-db": "^1.1.2",
|
"license": "ISC",
|
||||||
"node-fetch": "^2.6.1",
|
"dependencies": {
|
||||||
"uuid": "^8.3.2",
|
"discord-server-util": "git+https://github.com/discord-open-source/discord-server-util.git",
|
||||||
"ws": "^7.4.2"
|
"erlpack": "^0.1.3",
|
||||||
},
|
"jsonwebtoken": "^8.5.1",
|
||||||
"devDependencies": {
|
"lambert-db": "^1.1.2",
|
||||||
"@types/uuid": "^8.3.0",
|
"node-fetch": "^2.6.1",
|
||||||
"@types/ws": "^7.4.0"
|
"uuid": "^8.3.2",
|
||||||
}
|
"ws": "^7.4.2"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/jsonwebtoken": "^8.5.0",
|
||||||
|
"@types/uuid": "^8.3.0",
|
||||||
|
"@types/ws": "^7.4.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,31 +0,0 @@
|
|||||||
export enum OPCODES {
|
|
||||||
Dispatch,
|
|
||||||
Heartbeat,
|
|
||||||
Identify,
|
|
||||||
Presence_Update,
|
|
||||||
Voice_State_Update,
|
|
||||||
Resume,
|
|
||||||
Reconnect,
|
|
||||||
Request_Guild_Members,
|
|
||||||
Invalid_Session,
|
|
||||||
Hello,
|
|
||||||
Heartbeat_ACK,
|
|
||||||
}
|
|
||||||
export enum CLOSECODES {
|
|
||||||
Unknown_error = 4000,
|
|
||||||
Unknown_opcode,
|
|
||||||
Decode_error,
|
|
||||||
Not_authenticated,
|
|
||||||
Authentication_failed,
|
|
||||||
Already_authenticated,
|
|
||||||
Invalid_session,
|
|
||||||
Invalid_seq,
|
|
||||||
Rate_limited,
|
|
||||||
Session_timed_out,
|
|
||||||
Invalid_shard,
|
|
||||||
Sharding_required,
|
|
||||||
Invalid_API_version,
|
|
||||||
Invalid_intent,
|
|
||||||
Disallowed_intent,
|
|
||||||
}
|
|
||||||
export enum SEQUENCENUM {}
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
//* https://discord.com/developers/docs/topics/gateway
|
|
||||||
|
|
||||||
import { OPCODES, SEQUENCENUM } from "./codes";
|
|
||||||
|
|
||||||
export interface message_prod {
|
|
||||||
op: OPCODES;
|
|
||||||
d: object;
|
|
||||||
s: SEQUENCENUM;
|
|
||||||
t: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface message_dev {
|
|
||||||
req_type: "new_auth" | "check_auth";
|
|
||||||
token?: string;
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user