Verified Bot Doesn't Start

I have a verified discord bot that when starting it it does not work at all, the bot logs in but it never reaches the ready state. the same code works with the beta bot in 2 servers whilst the main is in 600+ servers. Screenshots include instancing and examples for commands (NOTE, the prod and dev thing are switched around because of me being stupid so its the other way round) I use discord.js 14.16.0. I can't share much code but please lmk if you need anything
No description
No description
No description
No description
23 Replies
d.js toolkit
d.js toolkitā€¢4w ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - āœ… Marked as resolved by staff
wowie
wowieOPā€¢4w ago
the table is sent at the end of the ready event so the bot is technically starting but it just isn't accepting or reciving commands
No description
wowie
wowieOPā€¢4w ago
and often the users table is NaN
wowie
wowieOPā€¢4w ago
No description
wowie
wowieOPā€¢4w ago
please ping me in any responses help would be mucho appreciated
wowie
wowieOPā€¢4w ago
the bot does turn on btw it just doesn't do any of the events
No description
wowie
wowieOPā€¢4w ago
like messagecreate etc etc
d.js docs
d.js docsā€¢4w ago
tag suggestion for @wowie: Please add the following code to your code base outside of any other event listeners and provide the full log output relevant to your issue.
client
.on("debug", console.log)
.on("warn", console.log)
client
.on("debug", console.log)
.on("warn", console.log)
- Note: if you initialize your Client as bot or other identifiers you need to use these instead of client - If the output is too long to post consider using a bin instead: gist | paste.gg | sourceb.in | hastebin
wowie
wowieOPā€¢4w ago
I added it @NyR lemme see if anything comes up
[WS => Manager] Fetched Gateway Information
URL: wss://gateway.discord.gg
Recommended Shards: 1
[WS => Manager] Session Limit Information
Total: 1000
Remaining: 999
[WS => Shard 0] Connecting to wss://gateway.discord.gg?v=10&encoding=json
[WS => Shard 0] Waiting for event hello for 60000ms
[WS => Shard 0] Preparing first heartbeat of the connection with a jitter of 0.3429168768252391; waiting 14145ms
[WS => Shard 0] Waiting for identify throttle
[WS => Shard 0] Identifying
shard id: 0
shard count: 1
intents: 63439
compression: none
[WS => Shard 0] Waiting for event ready for 15000ms
[WS => Shard 0] First heartbeat sent, starting to beat every 41250ms
[WS => Shard 0] Destroying shard
Reason: Zombie connection
Code: 4200
Recover: Resume
[WS => Shard 0] Connection status during destroy
Needs closing: true
Ready state: 1
[WS => Shard 0] Shard did not receive any guild packets in 15000 ms.
Unavailable guild count: 411
[WS => Shard 0] Connecting to wss://gateway-us-east1-d.discord.gg?v=10&encoding=json
[WS => Shard 0] Waiting for event hello for 60000ms
[WS => Shard 0] Tried to send a non-crucial payload before the shard was ready, waiting
[WS => Shard 0] Tried to send a non-crucial payload before the shard was ready, waiting
[WS => Shard 0] Preparing first heartbeat of the connection with a jitter of 0.20567810237402662; waiting 8484ms
[WS => Shard 0] Resuming session
resume url: wss://gateway-us-east1-d.discord.gg
sequence: 53
shard id: 0
[WS => Shard 0] Invalid session; will attempt to resume: false
[WS => Shard 0] Destroying shard
Reason: Invalid session
Code: 1000
Recover: Reconnect
[WS => Shard 0] Connection status during destroy
Needs closing: true
Ready state: 1
[WS => Shard 0] Cancelled initial heartbeat due to #destroy being called
[WS => Shard 0] Connecting to wss://gateway.discord.gg?v=10&encoding=json
[WS => Shard 0] Waiting for event hello for 60000ms
[WS => Shard 0] Preparing first heartbeat of the connection with a jitter of 0.649730318190016; waiting 26801ms
[WS => Shard 0] Waiting for identify throttle
[WS => Shard 0] Identifying
shard id: 0
shard count: 1
intents: 63439
compression: none
[WS => Shard 0] Waiting for event ready for 15000ms
[WS => Manager] Fetched Gateway Information
URL: wss://gateway.discord.gg
Recommended Shards: 1
[WS => Manager] Session Limit Information
Total: 1000
Remaining: 999
[WS => Shard 0] Connecting to wss://gateway.discord.gg?v=10&encoding=json
[WS => Shard 0] Waiting for event hello for 60000ms
[WS => Shard 0] Preparing first heartbeat of the connection with a jitter of 0.3429168768252391; waiting 14145ms
[WS => Shard 0] Waiting for identify throttle
[WS => Shard 0] Identifying
shard id: 0
shard count: 1
intents: 63439
compression: none
[WS => Shard 0] Waiting for event ready for 15000ms
[WS => Shard 0] First heartbeat sent, starting to beat every 41250ms
[WS => Shard 0] Destroying shard
Reason: Zombie connection
Code: 4200
Recover: Resume
[WS => Shard 0] Connection status during destroy
Needs closing: true
Ready state: 1
[WS => Shard 0] Shard did not receive any guild packets in 15000 ms.
Unavailable guild count: 411
[WS => Shard 0] Connecting to wss://gateway-us-east1-d.discord.gg?v=10&encoding=json
[WS => Shard 0] Waiting for event hello for 60000ms
[WS => Shard 0] Tried to send a non-crucial payload before the shard was ready, waiting
[WS => Shard 0] Tried to send a non-crucial payload before the shard was ready, waiting
[WS => Shard 0] Preparing first heartbeat of the connection with a jitter of 0.20567810237402662; waiting 8484ms
[WS => Shard 0] Resuming session
resume url: wss://gateway-us-east1-d.discord.gg
sequence: 53
shard id: 0
[WS => Shard 0] Invalid session; will attempt to resume: false
[WS => Shard 0] Destroying shard
Reason: Invalid session
Code: 1000
Recover: Reconnect
[WS => Shard 0] Connection status during destroy
Needs closing: true
Ready state: 1
[WS => Shard 0] Cancelled initial heartbeat due to #destroy being called
[WS => Shard 0] Connecting to wss://gateway.discord.gg?v=10&encoding=json
[WS => Shard 0] Waiting for event hello for 60000ms
[WS => Shard 0] Preparing first heartbeat of the connection with a jitter of 0.649730318190016; waiting 26801ms
[WS => Shard 0] Waiting for identify throttle
[WS => Shard 0] Identifying
shard id: 0
shard count: 1
intents: 63439
compression: none
[WS => Shard 0] Waiting for event ready for 15000ms
@NyR [WS => Shard 0] Destroying shard Reason: Zombie connection Code: 4200 Recover: Resume [WS => Shard 0] Connection status during destroy Needs closing: true Ready state: 1 [WS => Shard 0] Shard did not receive any guild packets in 15000 ms. Unavailable guild count: 348 [WS => Shard 0] Connecting to wss://gateway-us-east1-d.discord.gg?v=10&encoding=json [WS => Shard 0] Waiting for event hello for 60000ms [WS => Shard 0] Preparing first heartbeat of the connection with a jitter of 0.21394262128504526; waiting 8825ms [WS => Shard 0] Resuming session resume url: wss://gateway-us-east1-d.discord.gg sequence: 136 shard id: 0 [WS => Shard 0] Invalid session; will attempt to resume: false [WS => Shard 0] Destroying shard Reason: Invalid session Code: 1000 Recover: Reconnect [WS => Shard 0] Connection status during destroy Needs closing: true Ready state: 1 [WS => Shard 0] Cancelled initial heartbeat due to #destroy being called [WS => Shard 0] Connecting to wss://gateway.discord.gg?v=10&encoding=json [WS => Shard 0] Waiting for event hello for 60000ms [WS => Shard 0] Preparing first heartbeat of the connection with a jitter of 0.14070840894605796; waiting 5804ms [WS => Shard 0] Waiting for identify throttle [WS => Shard 0] Identifying shard id: 0 shard count: 1 intents: 63439 compression: none [WS => Shard 0] Waiting for event ready for 15000ms [WS => Shard 0] First heartbeat sent, starting to beat every 41250ms [WS => Shard 0] Destroying shard Reason: Zombie connection Code: 4200 Recover: Resume [WS => Shard 0] Connection status during destroy Needs closing: true Ready state: 1 [WS => Shard 0] Shard did not receive any guild packets in 15000 ms. Unavailable guild count: 400 [WS => Shard 0] Connecting to wss://gateway-us-east1-d.discord.gg?v=10&encoding=json [WS => Shard 0] Waiting for event hello for 60000ms [WS => Shard 0] Preparing first heartbeat of the connection with a jitter of 0.7337868602955251; waiting 30268ms [WS => Shard 0] Resuming session apparently there are a lot of zomby shards well its very simple i don't have sharding manager and i
wowie
wowieOPā€¢4w ago
yeah sorry i was just getting the code
No description
wowie
wowieOPā€¢4w ago
im not really sure what you mean by constructor, i make the main client just by logging in and doing it here
No description
wowie
wowieOPā€¢4w ago
yeah sorry i was just typing out my response well the code works on a dev token in 2 servers but when on the verified token on 500 ish servers it stops working and this keeps being sent since i added client.error checks [WS => Shard 0] Cancelled initial heartbeat due to #destroy being called [WS => Shard 0] Connecting to wss://gateway.discord.gg?v=10&encoding=json [WS => Shard 0] Waiting for event hello for 60000ms [WS => Shard 0] Preparing first heartbeat of the connection with a jitter of 0.33146396322520744; waiting 13672ms [WS => Shard 0] Waiting for identify throttle [WS => Shard 0] Identifying shard id: 0 shard count: 1 intents: 63439 compression: none [WS => Shard 0] Waiting for event ready for 15000ms [WS => Shard 0] First heartbeat sent, starting to beat every 41250ms [WS => Shard 0] Destroying shard Reason: Zombie connection Code: 4200 Recover: Resume [WS => Shard 0] Connection status during destroy Needs closing: true Ready state: 1 [WS => Shard 0] Shard did not receive any guild packets in 15000 ms. Unavailable guild count: 415 i have all intents on the bot but i'll try remove them and see
wowie
wowieOPā€¢4w ago
i need it for music sorry iforgot to mention that
No description
wowie
wowieOPā€¢4w ago
[WS => Manager] Fetched Gateway Information URL: wss://gateway.discord.gg Recommended Shards: 1 [WS => Manager] Session Limit Information Total: 1000 Remaining: 988 [WS => Shard 0] Connecting to wss://gateway.discord.gg?v=10&encoding=json [WS => Shard 0] Waiting for event hello for 60000ms [WS => Shard 0] Preparing first heartbeat of the connection with a jitter of 0.6824989004144624; waiting 28153ms [WS => Shard 0] Waiting for identify throttle [WS => Shard 0] Identifying shard id: 0 shard count: 1 intents: 63179 compression: none [WS => Shard 0] Waiting for event ready for 15000ms it seems the ready event takes too long? or something im not really sure wait nvm first heartbeat sent
wowie
wowieOPā€¢4w ago
No description
wowie
wowieOPā€¢4w ago
it didn't 48 improvements! apparently a bunch of guildDelete is getting pushed rn
wowie
wowieOPā€¢4w ago
No description
wowie
wowieOPā€¢4w ago
No description
wowie
wowieOPā€¢4w ago
well the ready event pushed but thats not the true guild count
No description
wowie
wowieOPā€¢4w ago
that might be a good sign
No description
wowie
wowieOPā€¢4w ago
lets test it out OH ITS WORKING YAY thats super weird yeah that might be it i have no idea how im going to fix that cause its an integral part of the bot šŸ˜­ but i'll do my best i guess do you mind if I add you for more advice about this directly, i'll try not to be annoying and spam you with questions I've implemnted that now, i'll try see if i can optimize the codebase cause the ready event odes a bunch of stuff alright, do you mind sending a friend request, you seem to know what you're doing so I'd like to be able to contact you as a last resort if i can;'t figure something out myself I've been trying to fix this for about a week now I recoded a bunch of stuff and it didn't work so this was kinda my last resort šŸ˜­
Syjalo
Syjaloā€¢4w ago
Just ask here
wowie
wowieOPā€¢4w ago
alr thats fine thanks so much for your help, it means a lot! Thank you for your help, i really appreciate it

Did you find this page helpful?