Hi everyone i have my discord bot running and i want to try and get 2 shards, i have got the shards.js file all setup but i get this error
Error: listen EADDRINUSE :::3000
at Server.setupListenHandle [as _listen2] (net.js:1286:14)
at listenInCluster (net.js:1334:12)
at Server.listen (net.js:1421:7)
at Function.listen (/rbd/pnpm-volume/1231ae95-fcb6-48e8-b4fc- 249ff6bf69a1/node_modules/.registry.npmjs.org/express/4.16.4/node_modules/express/lib/application.js:618:24)
Jump to
at Object.<anonymous> (/app/MusicBot.js:356:5)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
Emitted 'error' event at:
at emitErrorNT (net.js:1313:8)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:11)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
(node:20079) UnhandledPromiseRejectionWarning: Error: Shard 1's process exited before its Client became ready.
at Shard.once (/rbd/pnpm-volume/1231ae95-fcb6-48e8-b4fc-249ff6bf69a1/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/sharding/Shard.js:88:39)
at Object.onceWrapper (events.js:273:13)
at Shard.emit (events.js:182:13)
at Shard._handleExit (/rbd/pnpm-volume/1231ae95-fcb6-48e8-b4fc-249ff6bf69a1/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/sharding/Shard.js:272:10)
at ChildProcess.emit (events.js:182:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
(node:20079) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 117)
my shards.js contains this
const Discord = require('discord.js');
const Manager = new Discord.ShardingManager('./server.js');
Manager.spawn(2);
console.log(`${Manager.totalShards} Shards`);
any help?
MOD EDIT: remove timestamps and recategorize