Did you ever want to create a copy of a guild? Now you can! There is no need to manually create roles, channels and permissions, which can take very long depending on the original guilds size. The script does everything for you. It backs up a guild into a single file and lets you create a new guild from it. You can share your file with others, too.
The script must be run with a bot user token. According to discords statement, any kind of user account botting including so called SelfBots are forbidden. The script will therefore block the execution with a user account token.
settings.json
and fill in all necessary data (see Settings for more information)npm install
(on windows you can shift + right click inside the project folder and select 'open command prompt here'). You can alternatively use yarn install
(requires nodejs >= 16.6.0)node copy.js
in the console to print usageTo get the id of a guild open your client settings -> Appearance and then enable developer mode. If you now right click on a guild you can select 'Copy ID'.
Variable | Explanation |
---|---|
originalGuildId | The id of the guild you want to clone. Can be left blank if a guildData.json file already exists. |
newGuildId | The id of the new guild you want to clone to. |
newGuildAdminRoleId | The id of a role with administrator permissions. The bot needs to have this role on the new guild! You can manually create a new role called 'guildcopy' and the script will automatically use it. If you do so, just leave this field empty. |
cleanup | default: true - Set this to false, to skip the cleanup phase on the new guild |
copy.General | default: true - Set this to false to skip setting general guild data e.g. the guild's name or the icon |
copy.RCC | default: true - RCC stands for roles & categories & channels. Set this to false to skip creating them altogether |
copy.Emojis | default: false - Set to true to copy emojis (see also Common Behaviour) |
copy.Bans | default: false - Set to true to copy banned users. The bot needs to have the BAN_MEMBERS permission on the original guild if you enable this! |
language | default: en - Set this to any supported language from the translations folder |
output | default: all - Possible values: all for everything, error for errors only, none for no output at all |
sleepTimeout | default: 0 - Sleep timer in milliseconds (>0) to avoid possible ratelimits on very large guilds creations |
debug | default: false - Set to true for a more detailed general and error output e.g. when creating an issue |
token | The bot token. The bot does not need any permissions on the original guild (only exception: copy.Bans=true). |
Most of the common issues are displayed in the console while running the script. If you encounter crashes or any other weird behaviour not listed here feel free to create an issue. The script creates logs in the 'logs' folder. Feel free to upload those to something like pastebin and add them to the created issue to help me find the problem.
Of course, just create an issue or a pull request.
If you want to help translate the script, feel free do so so. Just create a copy of the en.json
in the translation
folder and create a pull request with the new translation. All [@@X@@]
statements are dynamic parts of a sentence and need to be in the correct spot for each language numbered with 1,2,3,... Please test your translation at least once before submitting it and don't forget to change the langcode/language/author at the top of the file.
This software is licensed under the terms of the GPLv3. For more details see LICENSE.