Closed as not planned
Description
Please describe the problem you are having in as much detail as possible:
I start the bot, when it starts using the ShardingManaer i get this error.
StriderM | Error [SHARDING_IN_PROCESS]: Shards are still being spawned.
StriderM | (node:1) UnhandledPromiseRejectionWarning: Error [SHARDING_READY_DIED]: Shard 0's process exited before its Client became ready.
then after it crashes with no other data, somethimes i get this
StriderM | (node:1) UnhandledPromiseRejectionWarning: Error [SHARDING_READY_DIED]: Shard 0's process exited before its Client became ready.
StriderM | at Shard.onDeath (/usr/src/Strider/node_modules/discord.js/src/sharding/Shard.js:158:16)
StriderM | at Object.onceWrapper (events.js:422:26)
StriderM | at Shard.emit (events.js:315:20)
StriderM | at Shard._handleExit (/usr/src/Strider/node_modules/discord.js/src/sharding/Shard.js:384:10)
StriderM | at ChildProcess.emit (events.js:315:20)
StriderM | at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
Include a reproducible code sample here, if possible:
Sharding Manager:
// Import All The Packages
require("dotenv").config();
const { ShardingManager } = require("discord.js");
// Create Your ShardingManger Instance
const manager = new ShardingManager("./index.js", {
execArgv: ['--trace-warnings'],
token: process.env.TOKEN,
shardArgs: ["--color"]
});
// Spawn The Shards
manager.spawn();
index file:
const { Client } = require("discord.js");
const client = new Client({
ws: { intents: 32511 },
restTimeOffset: 0,
rateLimitAsError: true,
disableMentions: "everyone",
}); // Require The Bot Client
// Get Our Packages
const glob = require("glob");
// Command & Event Files Using Glob
const commandFiles = glob.sync("./Helpers/commands/**/*.js");
for (const file of commandFiles) {
const command = require(file);
client.commands.set(command.name, command);
}
const eventFiles = glob.sync("./Helpers/events/**/*.js");
for (const file of eventFiles) {
const event = require(file);
const eventName = /\/events.(.*).js/.exec(file)[1];
client.on(eventName, event.bind(null, client));
}
// Login To The Discord API
client.login(process.env.TOKEN).catch(console.error);
Further details:
- discord.js version: v12.15.1
- Node.js version: v14.15.4
- Operating system: Ubunte
- Priority this issue should have – please be realistic and elaborate if possible: Urgent, i have 3 friends getting this issue... my bot has been down for 3 days now and my friends have been down a week...
Relevant client options:
- partials: none
- gateway intents: 32511 (Everything except Presence Intent, yes i do have the Members Intent)
- other: verified bot