From dcce53dc8b4759265469983b42e278fa4bd45364 Mon Sep 17 00:00:00 2001 From: Will Hoskings Date: Sun, 9 Feb 2020 15:47:02 +0000 Subject: [PATCH] Add Discord data types --- types/discord.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/types/discord.ts b/types/discord.ts index 2d5f01e7c..740aa2b7c 100644 --- a/types/discord.ts +++ b/types/discord.ts @@ -24,3 +24,31 @@ export interface DiscordBotGateway { reset_after: number } } + +export enum OpCode { + Dispatch = 0, + Heartbeat, + Identify, + StatusUpdate, + VoiceStateUpdate, + Resume, + Reconnect, + RequestGuildMembers, + InvalidSession, + Hello, + HeartbeatACK +} + +export enum GatewayCloseEvent { + UnknownError = 4000, + UnknownOpcode, + DecodeError, + NotAuthenticated, + AuthenticationFailed, + AlreadyAuthenticated, + InvalidSeq = 4007, + RateLimited, + SessionTimeout, + InvalidShard, + ShardingRequired +} \ No newline at end of file