summary refs log tree commit diff
path: root/src/util/Constants.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-05 16:25:27 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-05 16:25:27 +0100
commit43ce48e7c6c40b95ce47adc737a5527439370a1f (patch)
tree3ba5ecd7aa63eab83a5fe1ddd42af959e7e34010 /src/util/Constants.ts
parentMerge branch 'master' of https://github.com/discord-open-source/discord-gatew... (diff)
downloadserver-43ce48e7c6c40b95ce47adc737a5527439370a1f.tar.xz
:art: use discord-server-util
Diffstat (limited to 'src/util/Constants.ts')
-rw-r--r--src/util/Constants.ts37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/util/Constants.ts b/src/util/Constants.ts
new file mode 100644

index 00000000..cdc0d07d --- /dev/null +++ b/src/util/Constants.ts
@@ -0,0 +1,37 @@ +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 interface Payload { + op: OPCODES; + d?: any; + s?: number; + t?: string; +}