🎨 restructure
This commit is contained in:
parent
43ce48e7c6
commit
61cd85b7ed
1
.gitignore
vendored
1
.gitignore
vendored
@ -102,3 +102,4 @@ dist
|
||||
|
||||
# TernJS port file
|
||||
.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",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"lambert-db": "^1.1.2",
|
||||
"node-fetch": "^2.6.1",
|
||||
"uuid": "^8.3.2",
|
||||
"ws": "^7.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/uuid": "^8.3.0",
|
||||
"@types/ws": "^7.4.0"
|
||||
}
|
||||
"name": "discord-gateway",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "tsc -b .",
|
||||
"start": "npm run build && node dist/"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"discord-server-util": "git+https://github.com/discord-open-source/discord-server-util.git",
|
||||
"erlpack": "^0.1.3",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"lambert-db": "^1.1.2",
|
||||
"node-fetch": "^2.6.1",
|
||||
"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