Closed oodvg closed 4 years ago
Well yes, that is the only real way to do this. There is no "official" clone feature, but only libraries like this one. Since I do not see an actual issue here, I will close it. Feel free to further ask question though :)
So you don't have to be in the server at all for this to work. Just the server id?
No, you will need a Bot which is authorized to query the needed data on the specific server. The normal server structure with categories and channels don't need any special permissions, but things like the banned people will. Not being in the server or using a user account (selfbot) will not work. The latter one being not possible anymore, since discord openly said, they will ban people for using selfbots. Therefore the discord.js library stopped supporting them as well, so having a bot account on a server is a high enough barrier, so random people don't just copy your whole server.
So the client needs to be in the server to copy?
Yes exactly, otherwise it will not be able to get any data. The api only gives you data for server you are part of. Funny thing is, as soon as you are part of a server, you can get all categories and channels including all their specific settings and permissions, even if you can't see them because they are hidden (or not viewable) with your current permissions.
so i can join the server without any permissions, and get the guild info (roles, channels, etc) without selfbot as that falls under and can get the selfbot disabled. cant the bot/client (not selfbot) pull from your account as its synced with the client.isOwner
permission in djs?
You (as a user) can join any server, but a bot account needs to be invites by someone with enough permissions. So you can't really clone any given server. There is no connection between a normal user account and a bot account, beside the fact, that you need a user account to create a bot. There is no data that can be shared between both in any way inside the discord api-/ecosystem
so the bot doesnt need any permissions to copy the guild. correct
just needs to be in the server
Excluding the banned people on said server, yes. As soon as the bot is part of the server, the api gives you all needed information to clone it
doesnt this just pull the guild info, channels, and roles from the discord api? so you can copy any guild you would like?