mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-19 01:03:58 +00:00
BREAKING CHANGES: - Heartbeating removed - `config.consoleLogLevel` -> `config.logLevel` NEW FEATURES: - Training messages - Sequence number system - WebSocket close codes used instead of disconnect packets FIXES: - Improved error handling - Some performance improvements - Made code more clean - Updated dependencies
36 lines
756 B
TypeScript
Executable File
36 lines
756 B
TypeScript
Executable File
/**
|
|
* Disconnect reasons for clients
|
|
*/
|
|
enum DisconnectReason {
|
|
/**
|
|
* The client disconnected on its own (**CLIENT-ONLY**)
|
|
*/
|
|
PlannedDisconnect = 1000,
|
|
/**
|
|
* The client sent an invalid packet (unserializable or invalid JSON)
|
|
*/
|
|
InvalidPacket = 1007,
|
|
/**
|
|
* The server has encountered an internal error
|
|
*/
|
|
ServerError = 1011,
|
|
/**
|
|
* Unknown reason
|
|
*/
|
|
Generic = 4000,
|
|
/**
|
|
* The client did not respond with a heartbeat in time
|
|
*/
|
|
TimedOut = 4001,
|
|
/**
|
|
* The receiving end didn't have an open socket
|
|
*/
|
|
NoOpenSocket = 4003,
|
|
/**
|
|
* The client was not ready in time (**CLIENT-ONLY**)
|
|
*/
|
|
TooSlow = 4002,
|
|
}
|
|
|
|
export default DisconnectReason
|