From 6ba289199a6bd674819ae2e33738ff047e31cd1e Mon Sep 17 00:00:00 2001 From: ayntee Date: Fri, 11 Dec 2020 01:08:12 +0400 Subject: [PATCH] style: format source files --- src/module/shard.ts | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/src/module/shard.ts b/src/module/shard.ts index b23be8913..2385523dc 100644 --- a/src/module/shard.ts +++ b/src/module/shard.ts @@ -148,19 +148,27 @@ export async function createShard( }, ); - switch(code) { + switch (code) { case 4000: // TODO: reconnect case 4001: - throw new Error("[Unknown opcode] Sent an invalid Gateway opcode or an invalid payload for an opcode."); + throw new Error( + "[Unknown opcode] Sent an invalid Gateway opcode or an invalid payload for an opcode.", + ); case 4002: throw new Error("[Decode error] Sent an invalid payload to API."); case 4003: - throw new Error("[Not authenticated] Sent a payload prior to identifying."); + throw new Error( + "[Not authenticated] Sent a payload prior to identifying.", + ); case 4004: - throw new Error("[Authentication failed] The account token sent with your identify payload is incorrect."); + throw new Error( + "[Authentication failed] The account token sent with your identify payload is incorrect.", + ); case 4005: - throw new Error("[Already authenticated] Sent more than one identify payload."); + throw new Error( + "[Already authenticated] Sent more than one identify payload.", + ); case 4007: case 4008: case 4008: @@ -171,15 +179,25 @@ export async function createShard( createShard(data, identifyPayload, false, shardID); break; case 4010: - throw new Error("[Invalid shard] Sent an invalid shard when identifying."); + throw new Error( + "[Invalid shard] Sent an invalid shard when identifying.", + ); case 4011: - throw new Error("[Sharding required] The session would have handled too many guilds - you are required to shard your connection in order to connect."); + throw new Error( + "[Sharding required] The session would have handled too many guilds - you are required to shard your connection in order to connect.", + ); case 4012: - throw new Error("[Invalid API version] Sent an invalid version for the gateway."); + throw new Error( + "[Invalid API version] Sent an invalid version for the gateway.", + ); case 4013: - throw new Error("[Invalid intent(s)] Sent an invalid intent for a Gateway Intent."); + throw new Error( + "[Invalid intent(s)] Sent an invalid intent for a Gateway Intent.", + ); case 4014: - throw new Error("[Disallowed intent(s)] Sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not enabled or are not whitelisted for."); + throw new Error( + "[Disallowed intent(s)] Sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not enabled or are not whitelisted for.", + ); } }; }