bco2135
DIAdiscord.js - Imagine an app
•Created by bco2135 on 3/5/2024 in #djs-voice
Maintaining connection after restarting node
I have a bot that would connect to a channel and play sounds. I have a slash command that would play one of the few sound files I have, it works fine but when I restart node it would stay in the channel but if I try doing anything it would say that the bot isn't in a voice channel and I would have to reconnect the bot to the voice channel. I get the connection using though it would still return undefined even if the bot is in the channel (This is if I restarted node when the bot was already in a voice channel) Is there a way to keep the connection even if you restart node, because I sometimes have problems when the bot is on multiple servers and I restart node. Here's the full code of the command execute function
6 replies