Delete voice channel if 0 user
Guys, could anyone help me make sure the bot doesn't delete the channel if someone is there? At the moment it works, but it doesn't check if anyone has entered since the command was executed, so it deletes it!
I'm not very good at API yet, I'm doing my best...
13 Replies
- 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!Full code
Still nothing happens with my new code, I removed the setTimout, but as soon as I leave the channel it doesn't delete
No?
Guilds intent?
I already have it at the top of the file
No
I think
Oh
GatewayIntentBits.Guilds,
This?
I put it in but still nothing happens or maybe I'm crazy
The code looks like this now, but doesn't delete the channel as soon as I exit
https://starb.in/meGsmP.js
sry
Mhm, wait
Dude wtf
index.js
https://starb.in/sgChW2.js
commands/unility/create-channel.js
https://starb.in/Y7T6qn.js
I succeeded but I can't send the integration to the channel where the command was executed, why?
https://starb.in/R6iRqH.js
True
ALL DONE
But one question, I would like to make it so that if no one joins the voice channel within 20 seconds of creating it, it also deletes the channel.
@Qjuh
You can change the permissions so that people can't join
But what are you telling me? It is not the goal !! I only want to delete the room after 20 seconds if no one joins it after creation.
my bad i misread the message, ^^
setTimeout should work
if someone joins then clear the interval
A setTimeout, but it will check constantly, it's not good!
i think you're confusing it with setInterval
setTimeout only runs the function once after the given timeout
I see what I can do, thx