mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 08:50:07 +00:00
style: format source files
This commit is contained in:
@@ -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.",
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user