Bot (shards) keeps rebooting, causing me to hit the identify limit of 1k

Hey Guys, i already sent this message in #djs-help-v14 but though it'd be a better idea to post it here. Since i updated to djs 14 my bot (or some shards of it) keep rebooting seemingly at random.. This is my output including debug and warn logs:
info: Launching shard... {"shard":1,"timestamp":""}
Provided token: ***************************
Preparing to connect to the gateway...
[WS => Manager] Fetched Gateway Information
URL: wss://gateway.discord.gg
Recommended Shards: 1
[WS => Manager] Session Limit Information
Total: 1000
Remaining: 963
[WS => Manager] Spawning shards: 0
[WS => Shard 0] [CONNECT]
Gateway : wss://gateway.discord.gg/
Version : 10
Encoding : json
Compression: none
[WS => Shard 0] Setting a HELLO timeout for 20s.
[WS => Shard 0] [CONNECTED] Took 297ms
[WS => Shard 0] Clearing the HELLO timeout.
[WS => Shard 0] Setting a heartbeat interval for 41250ms.
[WS => Shard 0] [IDENTIFY] Shard 0/1 with intents: 34435
[WS => Shard 0] [READY] Session 01ad68bc9e809ef677947ed43e3c302e.
[WS => Shard 0] [ReadyHeartbeat] Sending a heartbeat.
[WS => Shard 0] Shard received all its guilds. Marking as fully ready.
info: Shard connected to Discord's Gateway. {"shard":1,"timestamp":""}
[1] Started deleting deprecated application (/) commands.
[WS => Shard 0] Heartbeat acknowledged, latency of 125ms.
[1] Started refreshing application (/) commands.
[1] Successfully reloaded local application (/) commands.
[1] Shard booted!

Provided token: ***************************
Preparing to connect to the gateway...
[WS => Manager] Fetched Gateway Information
URL: wss://gateway.discord.gg
Recommended Shards: 1
[WS => Manager] Session Limit Information
Total: 1000
Remaining: 962
[WS => Manager] Spawning shards: 0
[WS => Shard 0] [CONNECT]
Gateway : wss://gateway.discord.gg/
Version : 10
Encoding : json
Compression: none
[WS => Shard 0] Setting a HELLO timeout for 20s.
[WS => Shard 0] [CONNECTED] Took 228ms
[WS => Shard 0] Clearing the HELLO timeout.
[WS => Shard 0] Setting a heartbeat interval for 41250ms.
[WS => Shard 0] [IDENTIFY] Shard 0/1 with intents: 34435
[WS => Shard 0] [READY] Session 2920db5e445e0fef255dde96ccf3b0b7.
[WS => Shard 0] [ReadyHeartbeat] Sending a heartbeat.
[WS => Shard 0] Shard received all its guilds. Marking as fully ready.
info: Shard connected to Discord's Gateway. {"shard":1,"timestamp":""}
[1] Started deleting deprecated application (/) commands.
[WS => Shard 0] Heartbeat acknowledged, latency of 131ms.
[1] Started refreshing application (/) commands.
[1] Successfully reloaded local application (/) commands.
[1] Shard booted!

... in a loop
info: Launching shard... {"shard":1,"timestamp":""}
Provided token: ***************************
Preparing to connect to the gateway...
[WS => Manager] Fetched Gateway Information
URL: wss://gateway.discord.gg
Recommended Shards: 1
[WS => Manager] Session Limit Information
Total: 1000
Remaining: 963
[WS => Manager] Spawning shards: 0
[WS => Shard 0] [CONNECT]
Gateway : wss://gateway.discord.gg/
Version : 10
Encoding : json
Compression: none
[WS => Shard 0] Setting a HELLO timeout for 20s.
[WS => Shard 0] [CONNECTED] Took 297ms
[WS => Shard 0] Clearing the HELLO timeout.
[WS => Shard 0] Setting a heartbeat interval for 41250ms.
[WS => Shard 0] [IDENTIFY] Shard 0/1 with intents: 34435
[WS => Shard 0] [READY] Session 01ad68bc9e809ef677947ed43e3c302e.
[WS => Shard 0] [ReadyHeartbeat] Sending a heartbeat.
[WS => Shard 0] Shard received all its guilds. Marking as fully ready.
info: Shard connected to Discord's Gateway. {"shard":1,"timestamp":""}
[1] Started deleting deprecated application (/) commands.
[WS => Shard 0] Heartbeat acknowledged, latency of 125ms.
[1] Started refreshing application (/) commands.
[1] Successfully reloaded local application (/) commands.
[1] Shard booted!

Provided token: ***************************
Preparing to connect to the gateway...
[WS => Manager] Fetched Gateway Information
URL: wss://gateway.discord.gg
Recommended Shards: 1
[WS => Manager] Session Limit Information
Total: 1000
Remaining: 962
[WS => Manager] Spawning shards: 0
[WS => Shard 0] [CONNECT]
Gateway : wss://gateway.discord.gg/
Version : 10
Encoding : json
Compression: none
[WS => Shard 0] Setting a HELLO timeout for 20s.
[WS => Shard 0] [CONNECTED] Took 228ms
[WS => Shard 0] Clearing the HELLO timeout.
[WS => Shard 0] Setting a heartbeat interval for 41250ms.
[WS => Shard 0] [IDENTIFY] Shard 0/1 with intents: 34435
[WS => Shard 0] [READY] Session 2920db5e445e0fef255dde96ccf3b0b7.
[WS => Shard 0] [ReadyHeartbeat] Sending a heartbeat.
[WS => Shard 0] Shard received all its guilds. Marking as fully ready.
info: Shard connected to Discord's Gateway. {"shard":1,"timestamp":""}
[1] Started deleting deprecated application (/) commands.
[WS => Shard 0] Heartbeat acknowledged, latency of 131ms.
[1] Started refreshing application (/) commands.
[1] Successfully reloaded local application (/) commands.
[1] Shard booted!

... in a loop
I cant - for the love of god find the issue. In this example it happens right on boot - but on my other bot with many more shards it does just happen at random during service causing my bot to hit the 1k identify limit per 24h What i should do? I also saw someone here asking where the REST init code is place. Idk why i think this migh be interesting to this issue but its placed right in the ready listener.
// bot.ts
botClient.once("ready", async () => {
await readyListener();
});

//readyListener()
async function readyListener() {
await registerGuildCommands();
console.log(`[${shardID}] Shard booted!`);
// more stuff...
}
// bot.ts
botClient.once("ready", async () => {
await readyListener();
});

//readyListener()
async function readyListener() {
await registerGuildCommands();
console.log(`[${shardID}] Shard booted!`);
// more stuff...
}
Thanks very much for the help! - Best regards djs v14.03.0 | node v16.17.0
5 Replies
d.js docs
d.js docs3y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
conny.
conny.OP3y ago
I cannot believe this is the issue I’ve got an uncaught Exceptions listener exiting the program when dance let it run for a bit but I’m pretty confident That that’s the issue 😭
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
conny.
conny.OP3y ago
Yes thats it <:skull_AE:782432492409454623>
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server