discordjs / discord.js

A powerful JavaScript library for interacting with the Discord API
https://discord.js.org
Apache License 2.0
25.2k stars 3.96k forks source link

client.joinServer is not a function #2353

Closed KinanSy closed 6 years ago

KinanSy commented 6 years ago

Hello, I'm trying to make my bot join a server by a Invite string. Ex : "Gpq4P5" I executed this code:

client.JoinServer("codehere");

It returned to me in the console : client.joinServer is not a function need help

iCrawl commented 6 years ago

Automating a user account is against the ToS.

If it is not a user bot (also called selfbots), bots cannot join servers via a function.

amishshah commented 6 years ago

This is probably due to reading outdated documentation (see https://discordjs.readthedocs.io/en/latest/docs_client.html#joinserver-invite-callback)

I'm also going to reference https://github.com/rtfd/readthedocs.org/issues/3208 in hopes that the issue isn't forgotten.