Leave (NOT COMMAND)
How do I leave a server through my VSCode if i don't own the server (i have no permissions to kick the bot) and I want my bot to leave their server. Please help
19 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!
- ✅
Marked as resolved by OPand where should i input this
into my main index file
?
Where your client is ready
Eg in ready event
okay ill try it now
and where do i input which guild to leave
@Syjalo
client.guilds.cache.get('id')
that returns the guild on which you can call .leave()
okay perfect
time to test it
Sorry, still not quite exactly sure where to plug this in?
in your ready event
im a noob at coding 😭
what is the ready event
if you dont have an events folder, probably somewhere in the index.js
okay
client.on('ready', () => {...})
OH IN THAT JON
@chewie
here is my code
where should i put it in
not there
thats your message event
wait what
im so confused
messageCreate !== ready
in here?
please... just search for ready
:pepe_clap:
okay in that
let me try
the console.log("Left Server")
@chewie
holy shit am i dumb
i did it
thank you