noahkaiser
DIAdiscord.js - Imagine an app
•Created by noahkaiser on 7/23/2023 in #djs-questions
How can I respawn a disconnected client that was not spawned from a ShardingManager?
The issue was that the web-server instance was a webservice not a background worker for the specified site.
8 replies
DIAdiscord.js - Imagine an app
•Created by noahkaiser on 7/23/2023 in #djs-questions
How can I respawn a disconnected client that was not spawned from a ShardingManager?
Can you show me how to activate debug mode? The bot disconnected again without anything logging in the shardDisconnect event probably due to an unrecoverable error like you said.
8 replies
DIAdiscord.js - Imagine an app
•Created by noahkaiser on 7/23/2023 in #djs-questions
How can I respawn a disconnected client that was not spawned from a ShardingManager?
-Before my web-server was still running but my discord bot was disconnected from the gateway randomly.
-Now I am simulating the random disconnect that occurred before I had a handle for the disconnect.
-How can I reconnect my bot given that it was created from a WebSocketManager?
8 replies
DIAdiscord.js - Imagine an app
•Created by noahkaiser on 7/23/2023 in #djs-questions
How can I respawn a disconnected client that was not spawned from a ShardingManager?
I did not have a disconnect event file while the issue occured. Now I am creating one so that when it happens again, the bot can reconnect to the discord gateway.
In the ready event I call
await client.destroy();
const { Events, AuditLogEvent } = require('discord.js');
then the shardDisconnect
event fires and I am trying to reconnect the bot to the discord gateway.
i've noticed when I attempt to call await client.login()
after the client is destroyed my ready event is not firing again.
8 replies
DIAdiscord.js - Imagine an app
•Created by noahkaiser on 7/23/2023 in #djs-questions
How can I respawn a disconnected client that was not spawned from a ShardingManager?
-I am using discord.js v14.11.0
-I need to reconnect my discord bot after it disconnects from the discord gateway.
8 replies