Coder Social home page Coder Social logo

jisagi / discord-guild-copy Goto Github PK

View Code? Open in Web Editor NEW
202.0 202.0 105.0 147 KB

A script to copy a discord guild/server

License: GNU General Public License v3.0

JavaScript 100.00%
backup clone copy discord discord-guild-copy discord-js discord-server-copy

discord-guild-copy's Introduction

Jisagi's github stats

discord-guild-copy's People

Contributors

androz2091 avatar d3rise avatar embervulpix avatar hideakiatsuyo avatar islemci avatar jisagi avatar roncli avatar ultard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

discord-guild-copy's Issues

Discordjs 12.0.0

I have a problem, when i clone the discordjs version 12.0.0, i got a 301 moved permantly error. How can i patch it ?

Outdated script version?

Please describe the problem you are having in detail:

I executed the script and heres what I got:

Language English selected. Translated by Jisagi
Successfully logged in as Discord Guild Cloner#6821. Starting script
Latest discord.js version installed
You are not using the latest script version. Please redownload the newest version.
Your version: 1.2.0
Latest version: 1.2.1

How do I download the newest version?

Additional information:

  • Node.js version: 10.15.1
  • Operating system: Windows 10

Help again sorry

Please describe the problem you are having in detail:
image
what do i do?
Please describe the problem in as much detail as possible. Please include any thrown error codes as well.

Additional information:

  • Node.js version:latest
  • Operating system:win-7

Not work error in translation.js line 31

root@barrax:~/clone2/Discord-guild-copy# node copy.js clone
/root/clone2/Discord-guild-copy/objects/translator.js:31
} catch {
^

SyntaxError: Unexpected token {
at new Script (vm.js:51:7)
at createScript (vm.js:136:10)
at Object.runInThisContext (vm.js:197:10)
at Module._compile (module.js:613:28)
at Object.Module._extensions..js (module.js:660:10)
at Module.load (module.js:561:32)
at tryModuleLoad (module.js:501:12)
at Function.Module._load (module.js:493:3)
at Module.require (module.js:593:17)
at require (internal/module.js:11:18)

NewGuildAdminRole.permissions.has is not a function

when I run node copy.js clone
I get this:
Language English selected. Translated by Jisagi
Successfully logged in as PalBot#1690. Starting script
Latest script version installed
newGuildAdminRole.permissions.has is not a function

I just did npm install and also I have input a role ID into the settings.

Suggestion

Lot's of work to do but you could make it save the guilds as a file (such as a json file) and then make it also be possible to load a guild from that file.

Support Yarn

Please describe the problem you are having in detail:

To get this working with Yarn, I had to use synp to convert yarn.lock to package-lock.json and disable djsVersionCheck. Otherwise, it would tell me both Node and discord.js were outdated.

Additional information:

  • Node.js version: 11.7.0
  • Operating system: CYGWIN_NT-10.0-WOW

Code

Get a lot of erroors

Missing permissions

The bot is added to both guilds with the IDs of each in settings.json and the 'guildcopy' role is added on the new server however I still get Error: DiscordAPIError: Missing Permissions.
screen shot 2018-01-29 at 11 49 11
This is the error I get.
Please help 😄

Fn.bind error

Successfully logged in as botxd#1746. Starting script.
TypeError: fn.bind is not a function
at Map.find (C:\Users\Defalt\Desktop\Discord-guild-copy-master\Discord-guild
-copy-master\node_modules\discord.js\src\util\Collection.js:171:49)
at Function.validateSettings (C:\Users\Defalt\Desktop\Discord-guild-copy-mas
ter\Discord-guild-copy-master\objects\validator.js:27:48)
at Client.client.on (C:\Users\Defalt\Desktop\Discord-guild-copy-master\Disco
rd-guild-copy-master\copy.js:24:47)
at Client.emit (events.js:187:15)
at WebSocketConnection.triggerReady (C:\Users\Defalt\Desktop\Discord-guild-c
opy-master\Discord-guild-copy-master\node_modules\discord.js\src\client\websocke
t\WebSocketConnection.js:114:17)
at WebSocketConnection.checkIfReady (C:\Users\Defalt\Desktop\Discord-guild-c
opy-master\Discord-guild-copy-master\node_modules\discord.js\src\client\websocke
t\WebSocketConnection.js:130:61)
at GuildCreateHandler.handle (C:\Users\Defalt\Desktop\Discord-guild-copy-mas
ter\Discord-guild-copy-master\node_modules\discord.js\src\client\websocket\packe
ts\handlers\GuildCreate.js:14:31)
at WebSocketPacketManager.handle (C:\Users\Defalt\Desktop\Discord-guild-copy
-master\Discord-guild-copy-master\node_modules\discord.js\src\client\websocket\p
ackets\WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (C:\Users\Defalt\Desktop\Discord-guild-copy-
master\Discord-guild-copy-master\node_modules\discord.js\src\client\websocket\We
bSocketConnection.js:316:35)
at WebSocketConnection.onMessage (C:\Users\Defalt\Desktop\Discord-guild-copy
-master\Discord-guild-copy-master\node_modules\discord.js\src\client\websocket\W
ebSocketConnection.js:279:10)

Note: I already tried reinstall NodeJS

Nodejs version to 8.0.0 or higher

Please describe the problem you are having in detail:

Please describe the problem in as much detail as possible. Please include any thrown error codes as well.

Additional information: It keeps putting out "Please update your Nodejs version to 8.0.0 or higher" even though i upgraded the node.js please help

  • Node.js version: v10.15.1
  • Operating system: Windows 10

Token Error?

MySettings.json:

{
    "originalGuildId": "4****************3",
    "newGuildId": "43297************8",
    "newGuildAdminRoleId": "",
    "copyEmojis": false,
    "copyBans": false,
    "debug": false,
    "token": "NDMyOTk2NDgyNjQ4NjM3NDQw.Da1cww.QMaVX8Lea6u6IVT7w8kXqO8cG_M"
}

I made on the New Guild a Role with the Name: "guildcopy"
I renewed my ^ Token ^!

MyOutput:

server@server1:~/discord_guild_copy/Discord-guild-copy$ node copy.js
/home/server/discord_guild_copy/Discord-guild-copy/copy.js:11
client.on('ready', async () => {
                         ^

SyntaxError: Unexpected token (
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3
server@server1:~/discord_guild_copy/Discord-guild-copy$

Memory issue

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ready listeners added. Use emitter.setMaxListeners() to increase limit

I receive that error message everytime i run node copy.js clone

"You are not running the latest version of discord.js"

so i recently lost control of my discord account but my friend was a owner as well as me (we shared equal perms) so i made my bot all that shizzle shazzle but finally i had to edit package.json to the latest version of discord.js because it was giving me errors (from the npm website itself) so i'm actually running discord.js = 11.5.1 which is currently the latest version to my knowledge any help would be greatly appreciated thanks in advance
Edit: All i really need to know is what version of discord.js this cloner runs on

Async problem

I have an error :
client.on('ready', async () => {
^

SyntaxError: Unexpected token (
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:383:7)
at startup (bootstrap_node.js:149:9)

Error trying to copy

Happens when I run "node copy.js clone" bot doesn't even start.

C:\Users\Calvin\Desktop\Discord\node_modules\discord.js\src\client\websocket\WebSocketShard.js:171
this.off(ShardEvents.CLOSE, onClose);
^

TypeError: this.off is not a function
at WebSocketShard.onReady (C:\Users\Calvin\Desktop\Discord\node_modules\discord.js\src\client\websocket\WebSocketShard.js:171:14)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at WebSocketShard.emit (events.js:208:7)
at WebSocketShard.onPacket (C:\Users\Calvin\Desktop\Discord\node_modules\discord.js\src\client\websocket\WebSocketShard.js:339:14)
at WebSocketShard.onMessage (C:\Users\Calvin\Desktop\Discord\node_modules\discord.js\src\client\websocket\WebSocketShard.js:264:10)
at WebSocket.onMessage (C:\Users\Calvin\Desktop\Discord\node_modules\ws\lib\event-target.js:120:16)
at emitOne (events.js:116:13)
at WebSocket.emit (events.js:211:7)
at Receiver.receiverOnMessage (C:\Users\Calvin\Desktop\Discord\node_modules\ws\lib\websocket.js:789:20)

Additional information:
I've updated discord.js and tried clean wiping the files but same issues.

  • Node.js version: v8.15.0
  • Operating system: Windows 10

Node Version Issue...

When I run node copy.js clone it gives me an error of "Please update your Nodejs version to 10.0.0 or higher" even though I have node v10.16.3

What do I do?
Capture

  • Node.js version: v10.16.3
  • Operating system: Windows 10

;-;

TypeError: Cannot read property 'new' of undefined
at options.overwrites.textChannel.permOverwrites.map.permOver
\objects\creator.js:219:80

newGuildAdminRole.permissions.has is not a function

Bonsoir, j'ai trouvé votre Discord-guild-copy, en cherchant une version de Xénon en javascript.
Je l'ai téléchargé, extraire, puis fait les settings et je l'ai 'node copy.js clone'.
Problème, il me dit que "newGuildAdminRole.permissions.has is not a function", je cherche la solution pour y remédier sur internet, ainsi que dans les issues, et on voit qu'il faut avoir la version de nodejs > 12.x.x.
J'ai donc fait la mise à jour, mais le problème est toujours présent.
Je recherche d’avantage sans réponse à mon problème.
Avez-vous une solution ?

J'ai même mit la ligne concernant cette erreur dans le validator en commentaire pour voir la suite, mais cette fois-ci, c'est "guild.iconURL is not a function" qui s'y met.
J'ai même mit aussi la ligne qui vérifie la version de discord.js (qui est à la dernière version mais me dit qu'il faut la retélécharger sans-cesse) en commentaire.

J'apprécie si vous avez la solution.
Si je dois vous ajouter sur discord ?

Bonne soirée, et merci pour ce guild-copy.

Good evening, I found for Discord-guild-copy, looking for a version of Xenon in js.
I downloaded it, extracted it, then made the settings and I got it 'node copy.js clone'.
Problem, he tells me that "newGuildAdminRole.permissions.has is not a function", I seek the solution to fix it on the internet, as well as in issues, and we see that we must have the version of nodejs> 12.x.x.
So I did the update, but the problem is still present.
I am looking for more unanswered to my problem.
Do you have a solution ?

I even put the line concerning this error in the validator in comment to see the continuation, but this time, it is "guild.iconURL is not a function" which is put there.
I even put also the line which verifies the version of discord.js (which is the last version but tells me that it must be reloaded again and again) in comment.

I appreciate if you have the solution.
If I have to add you on discord?

Good evening, and thank you for this guild-copy.
(I have use google translate for this. Sorry).

Issue

[11.05.2018 02:01:40] undefined
[11.05.2018 02:04:11] undefined
[11.05.2018 02:06:20] undefined
[11.05.2018 02:08:41] TypeError: newGuildAdminRole.permissions.has is not a function
at Function.validateSettings (/root/guildcopy/objects/validator.js:35:44)
at Client.client.on (/root/guildcopy/copy.js:34:41)
at Client.emit (events.js:187:15)
at WebSocketConnection.triggerReady (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:125:17)
at WebSocketConnection.checkIfReady (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:141:61)
at GuildCreateHandler.handle (/root/node_modules/discord.js/src/client/websocket/packets/handlers/GuildCreate.js:13:31)
at WebSocketPacketManager.handle (/root/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
at WebSocket.onMessage (/root/node_modules/ws/lib/event-target.js:120:16)
[11.05.2018 02:10:01] TypeError: newGuildAdminRole.permissions.has is not a function
at Function.validateSettings (/root/guildcopy/objects/validator.js:35:44)
at Client.client.on (/root/guildcopy/copy.js:34:41)
at Client.emit (events.js:187:15)
at WebSocketConnection.triggerReady (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:125:17)
at WebSocketConnection.checkIfReady (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:141:61)
at GuildCreateHandler.handle (/root/node_modules/discord.js/src/client/websocket/packets/handlers/GuildCreate.js:13:31)
at WebSocketPacketManager.handle (/root/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
at WebSocket.onMessage (/root/node_modules/ws/lib/event-target.js:120:16)
[11.05.2018 02:13:08] TypeError: guild.iconURL is not a function
at Function.getGeneralData (/root/guildcopy/objects/serializer.js:71:25)
at Function.serializeOldGuild (/root/guildcopy/objects/serializer.js:22:34)
at Client.client.on (/root/guildcopy/copy.js:55:36)
at Client.emit (events.js:187:15)
at WebSocketConnection.triggerReady (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:125:17)
at WebSocketConnection.checkIfReady (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:141:61)
at GuildCreateHandler.handle (/root/node_modules/discord.js/src/client/websocket/packets/handlers/GuildCreate.js:13:31)
at WebSocketPacketManager.handle (/root/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
[11.05.2018 02:13:20] TypeError: newGuildAdminRole.permissions.has is not a function
at Function.validateSettings (/root/guildcopy/objects/validator.js:35:44)
at Client.client.on (/root/guildcopy/copy.js:34:41)
at Client.emit (events.js:187:15)
at WebSocketConnection.triggerReady (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:125:17)
at WebSocketConnection.checkIfReady (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:141:61)
at GuildCreateHandler.handle (/root/node_modules/discord.js/src/client/websocket/packets/handlers/GuildCreate.js:13:31)
at WebSocketPacketManager.handle (/root/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
at WebSocket.onMessage (/root/node_modules/ws/lib/event-target.js:120:16)
[11.05.2018 02:13:34] TypeError: newGuildAdminRole.permissions.has is not a function
at Function.validateSettings (/root/guildcopy/objects/validator.js:35:44)
at Client.client.on (/root/guildcopy/copy.js:34:41)
at Client.emit (events.js:187:15)
at WebSocketConnection.triggerReady (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:125:17)
at WebSocketConnection.checkIfReady (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:141:61)
at GuildCreateHandler.handle (/root/node_modules/discord.js/src/client/websocket/packets/handlers/GuildCreate.js:13:31)
at WebSocketPacketManager.handle (/root/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (/root/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
at WebSocket.onMessage (/root/node_modules/ws/lib/event-target.js:120:16)

Copy bots

This is a suggestion and I am not sure if it's even possible. I was wondering if it would reinvite all bots it could. The invite if of the hot for the URL is the bots id so it could fetch it. If this is possible it would be comvient.

Error when trying to clone

For some reason I get this in the console:

C:\Discord-guild-copy-master>node copy.js clone
Language English selected. Translated by Jisagi
Successfully logged in as 1111#1693. Starting script
Latest script version installed
Error: New guild admin role id doesn't exist
at Function.validateSettings (C:\Discord-guild-copy-master\objects\validator.js:35:39)
at Client.client.on (C:\Discord-guild-copy-master\copy.js:59:41)
at process._tickCallback (internal/process/next_tick.js:68:7)

doesn't seem to know my version

isagi-discord-guild-copy-10:~ 15:23 
$ node copy.js clone
nodejs: v10.15.3
Language English selected. Translated by Jisagi
Successfully logged in as Event Manager#5309. Starting script
Please update your Nodejs version to 10.0.0 or higher

My node version is as high as i can update it, which is higher than 10.0.0

Invalid role

Language English selected. Translated by Jisagi
Successfully logged in as Backup2001#2501. Starting script
Latest discord.js version installed
Latest script version installed

  1. Serializing general data
  2. Serializing role data
  3. Serializing category data
  4. Serializing text channel data
  5. Serializing voice channel data
  6. Serializing emojis
  7. Serializing bans
  8. Saving guild data to file
  9. Serialization finished and data successfully saved
  10. Deleting channels
  11. Deleting roles
    Invalid Role

I am getting that error

  • Node.js version: v10.15.0
  • Operating system: Windows 10

Cannot read property 'id' of undefined

Latest discord.js version installed
Latest script version installed

  1. Serializing general data
  2. Serializing role data
    Cannot read property 'id' of undefined

it gets to the second stage and just gives that error

Edit:
It's this bit of code in serializer.js

static serializeRoles(guildToCopy) {
    let roleCol = guildToCopy.roles.sort((a, b) => b.position - a.position);
    let roles = roleCol.map(role => {
        return {
            idOld: role.id,
            name: role.name,
            hexColor: role.hexColor,
            hoist: role.hoist,
            mentionable: role.mentionable,
            position: role.position,
            rawPosition: role.rawPosition,
            defaultRole: guildToCopy.defaultRole.id === role.id,
            permBitfield: role.permissions.bitfield,
        };
    });

Need Help

I need to speak with you in private can i have your discord support server link?

Errors when installing.

Please describe the problem you are having in detail:
I'm getting errors when trying to install. I'll add a screenshot
Please describe the problem in as much detail as possible. Please include any thrown error codes as well.
Code: ENOGIT
Additional information:

  • Node.js version: 10.15.0
  • Operating system: Windows 10

image
2019-01-18T01_25_37_389Z-debug.log

User Token

Is it possible to use a discord user token beside using a bot token ?

I actually need to copy a discord that isn't mine so I can't put a bot on it, so need to use an account to copy it and use a bot to paste it.

Error while trying to install

When I run the npm install command this is what I get
$ npm install
npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\mingw64\bin\git.EXE ls-remote -h -t git://github.com/hydrabolt/discord.js.git
npm ERR!
npm ERR! fatal: unable to look up github.com (port 9418) (Either the application has not called WSAStartup, or WSAStartup failed. )
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Craig\AppData\Roaming\npm-cache_logs\2018-12-01T23_05_09_895Z-debug.log

guildcopy problem

hello, i downloaded your guildcopy repository, i put your code on a mismatch bot with the version of node 8.11.2 and the version discord.js 11.3.2, the bot starts ok an error this product has step (7. Creating roles) TypeError: newGuild.roles.create is not a function. I do not understand how to fix this, can you help me please ?

Discord crashing bot action too fast

Hello i reccomend to add a delay before any action on channels like 1sec delay after delete any channel becouse its crashing discord on pc: i5 7500 16gb ram rx480 and need restart of disc becouse you still see removed channels just server lagged

not working

Please describe the problem you are having in detail:

Please describe the problem in as much detail as possible. Please include any thrown error codes as well.

image
what do i do? it's not cloning and its a bot token
Additional information:

  • Node.js version:
  • Operating system: windows 7

Discord nitro extra emoji space...

Please describe the problem you are having in detail:

Please describe the problem in as much detail as possible. Please include any thrown error codes as well.

Hello i found the problem in script. If server has nitro boost and like extra 50+ emoji space if want to use script to clone discord server to other server it will hang up and freeze when space will end (as my observation) The solution can be. If it have any error when creating emoji, skip this and go next step :)

Additional information:

  • Node.js version: 10
  • Operating system: ubuntu

Could be an issue that I myself am having but-

PS C:\Users\User\Desktop\Discord-guild-copy-master> npm install
npm ERR! code ENOGIT
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache_logs\2018-02-01T03_54_15_041Z-debug.log

Unexpected token :

Sorry to ask you another time but i have an problem : (function (exports, require, module, __filename, __dirname) { {"step":9,"general":{"name":"Discordia","region":"eu-west","icon":"https://cdn.discordapp.com/icons/432961277912940545/e57d98d76b1d1eb2eadc1dd71129a67b.png?size=2048","verificationLevel":0,"afkTimeout":300,"explicitContentFilter":0},"roles":[{"idOld":"483925346551463936","name":"f","hexColor":"#000000","hoist":false,"mentionable":false,"position":19,"rawPosition":19,"defaultRole":false,"permBitfield":8},{"idOld":"467725119251546112","name":"BAR","hexColor":"#000000","hoist":false,"mentionable":false,"position":18,"rawPosition":18,"defaultRole":false,"permBitfield":262216},{"idOld":"473987750123798538","name":"Util-dev","hexColor":"#000000","hoist":false,"mentionable":false,"position":17,"rawPosition":17,"defaultRole":false,"permBitfield":262216},{"idOld":"483720663933386753","name":"Commandant","hexColor":"#f1c40f","hoist":true,"mentionable":true,"position":16,"rawPosition":16,"defaultRole"

SyntaxError: Unexpected token :
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:607:28)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Client.client.on (/storage/emulated/0/d/copy.js:60:25)

The file content :
{"step":9,"general":{"name":"Discordia","region":"eu-west","icon":"https://cdn.discordapp.com/icons/432961277912940545/e57d98d76b1d1eb2eadc1dd71129a67b.png?size=2048","verificationLevel":0,"afkTimeout":300,"explicitContentFilter":0},"roles":[{"idOld":"483925346551463936","name":"f","hexColor":"#000000","hoist":false,"mentionable":false,"position":19,"rawPosition":19,"defaultRole":false,"permBitfield":8},{"idOld":"467725119251546112","name":"BAR","hexColor":"#000000","hoist":false,"mentionable":false,"position":18,"rawPosition":18,"defaultRole":false,"permBitfield":262216},{"idOld":"473987750123798538","name":"Util-dev","hexColor":"#000000","hoist":false,"mentionable":false,"position":17,"rawPosition":17,"defaultRole":false,"permBitfield":262216},{"idOld":"483720663933386753","name":"Commandant","hexColor":"#f1c40f","hoist":true,"mentionable":true,"position":16,"rawPosition":16,"defaultRole":false,"permBitfield":104324169},{"idOld":"483720664608407583","name":"Staff","hexColor":"#000000","hoist":false,"mentionable":false,"position":15,"rawPosition":15,"defaultRole":false,"permBitfield":104324161},{"idOld":"483720665019449356","name":"Caporal","hexColor":"#2ecc71","hoist":false,"mentionable":false,"position":14,"rawPosition":14,"defaultRole":false,"permBitfield":104324161},{"idOld":"483720665976012820","name":"Douanier","hexColor":"#e74c3c","hoist":false,"mentionable":false,"position":13,"rawPosition":13,"defaultRole":false,"permBitfield":104324161},{"idOld":"483720666374340646","name":"Bot","hexColor":"#000000","hoist":false,"mentionable":false,"position":12,"rawPosition":12,"defaultRole":false,"permBitfield":104324169},{"idOld":"483720667183972362","name":"Android","hexColor":"#2ecc71","hoist":false,"mentionable":false,"position":11,"rawPosition":11,"defaultRole":false,"permBitfield":104324169},{"idOld":"483720667481505793","name":"Koya","hexColor":"#000000","hoist":false,"mentionable":false,"position":10,"rawPosition":10,"defaultRole":false,"permBitfield":2146958463},{"idOld":"483720668354183188","name":"A vérifier","hexColor":"#95a5a6","hoist":false,"mentionable":false,"position":9,"rawPosition":9,"defaultRole":false,"permBitfield":104324161},{"idOld":"483720669071409172","name":"Soldat","hexColor":"#e91e63","hoist":false,"mentionable":false,"position":8,"rawPosition":8,"defaultRole":false,"permBitfield":104324161},{"idOld":"483720669436051469","name":"Muted","hexColor":"#818386","hoist":false,"mentionable":false,"position":7,"rawPosition":7,"defaultRole":false,"permBitfield":104324161},{"idOld":"483720670044356609","name":"Général","hexColor":"#3498db","hoist":false,"mentionable":false,"position":6,"rawPosition":6,"defaultRole":false,"permBitfield":104324161},{"idOld":"483720670480564236","name":"ThomasDC","hexColor":"#000000","hoist":false,"mentionable":false,"position":5,"rawPosition":5,"defaultRole":false,"permBitfield":104324169},{"idOld":"483720671449317376","name":"Lieutenant","hexColor":"#d7342a","hoist":false,"mentionable":false,"position":4,"rawPosition":4,"defaultRole":false,"permBitfield":262208},{"idOld":"483720672162349076","name":"ToPPazZe","hexColor":"#000000","hoist":false,"mentionable":false,"position":3,"rawPosition":3,"defaultRole":false,"permBitfield":262216},{"idOld":"483720672812597263","name":"BAR","hexColor":"#000000","hoist":false,"mentionable":false,"position":2,"rawPosition":2,"defaultRole":false,"permBitfield":262216},{"idOld":"484833977882902530","name":"guildcopy","hexColor":"#000000","hoist":false,"mentionable":false,"position":1,"rawPosition":1,"defaultRole":false,"permBitfield":8},{"idOld":"432961277912940545","name":"@everyone","hexColor":"#000000","hoist":false,"mentionable":false,"position":0,"rawPosition":0,"defaultRole":true,"permBitfield":8}],"categories":[{"idOld":"483720672686899206","name":"Informations","position":0,"rawPosition":1,"permOverwrites":[]},{"idOld":"483720676495196180","name":"Douane","position":1,"rawPosition":3,"permOverwrites":[]},{"idOld":"483720677812207616","name":"Haut gradés","position":2,"rawPosition":6,"permOverwrites":[]},{"idOld":"483720685299171368","name":"BAR","position":3,"rawPosition":8,"permOverwrites":[]},{"idOld":"483720688453156891","name":"infiltration","position":4,"rawPosition":10,"permOverwrites":[]},{"idOld":"483720691523256335","name":"Données","position":5,"rawPosition":12,"permOverwrites":[]},{"idOld":"483720664054890508","name":"Stage BAR","position":6,"rawPosition":14,"permOverwrites":[]},{"idOld":"483720699530182661","name":"Commandement","position":7,"rawPosition":15,"permOverwrites":[]},{"idOld":"483720700822159376","name":"informations BAR","position":8,"rawPosition":17,"permOverwrites":[]},{"idOld":"483720702051221524","name":"informations stagiaire","position":9,"rawPosition":19,"permOverwrites":[]}],"textChannel":[{"id":"483720665179095040","name":"membres-dangereux","topic":null,"nsfw":false,"isSystemChannel":false,"position":0,"rawPosition":4,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720667238367243","name":"discussion-bar","topic":null,"nsfw":false,"isSystemChannel":false,"position":1,"rawPosition":5,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720667989278742","name":"logs","topic":null,"nsfw":false,"isSystemChannel":false,"position":2,"rawPosition":7,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720669335388174","name":"cancer","topic":null,"nsfw":false,"isSystemChannel":false,"position":3,"rawPosition":9,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720669960601603","name":"blacklist","topic":null,"nsfw":false,"isSystemChannel":false,"position":4,"rawPosition":11,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720671478808596","name":"missions-disponibles","topic":null,"nsfw":false,"isSystemChannel":false,"position":5,"rawPosition":13,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720672124600341","name":"missions-disponibles","topic":null,"nsfw":false,"isSystemChannel":false,"position":6,"rawPosition":16,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720674066694144","name":"secte-d’allthefoxes","topic":null,"nsfw":false,"isSystemChannel":false,"position":7,"rawPosition":18,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720674813149224","name":"legend-ki","topic":null,"nsfw":false,"isSystemChannel":false,"position":8,"rawPosition":20,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720675060875274","name":"fulldeath","topic":null,"nsfw":false,"isSystemChannel":false,"position":9,"rawPosition":21,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720675953999922","name":"questions","topic":null,"nsfw":false,"isSystemChannel":false,"position":10,"rawPosition":22,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720677069946881","name":"serveurs-de-raid-invitation-invalide","topic":null,"nsfw":false,"isSystemChannel":false,"position":11,"rawPosition":23,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720678525370369","name":"kumet","topic":null,"nsfw":false,"isSystemChannel":false,"position":12,"rawPosition":24,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720679091601408","name":"cyberfucker","topic":null,"nsfw":false,"isSystemChannel":false,"position":13,"rawPosition":25,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720679615758366","name":"darksquad","topic":null,"nsfw":false,"isSystemChannel":false,"position":14,"rawPosition":26,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720680529985573","name":"affaire-kanna","topic":null,"nsfw":false,"isSystemChannel":false,"position":15,"rawPosition":27,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720681205268500","name":"serveurs-de-raid","topic":null,"nsfw":false,"isSystemChannel":false,"position":16,"rawPosition":28,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720681616441345","name":"réponsed","topic":null,"nsfw":false,"isSystemChannel":false,"position":17,"rawPosition":29,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720682295787521","name":"screens-secrets","topic":null,"nsfw":false,"isSystemChannel":false,"position":18,"rawPosition":30,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720683126390799","name":"absences","topic":null,"nsfw":false,"isSystemChannel":false,"position":19,"rawPosition":31,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720683487232022","name":"grades","topic":null,"nsfw":false,"isSystemChannel":false,"position":20,"rawPosition":32,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720684611174400","name":"règlement-blacklist","topic":null,"nsfw":false,"isSystemChannel":false,"position":21,"rawPosition":33,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720685852557312","name":"commandes","topic":null,"nsfw":false,"isSystemChannel":false,"position":22,"rawPosition":34,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720686729297920","name":"informations","topic":null,"nsfw":false,"isSystemChannel":false,"position":23,"rawPosition":35,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720687379546112","name":"discussion-stagiaire","topic":null,"nsfw":false,"isSystemChannel":false,"position":24,"rawPosition":36,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720687857434625","name":"urgence-report","topic":null,"nsfw":false,"isSystemChannel":false,"position":25,"rawPosition":37,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720688847290380","name":"as-plateform","topic":null,"nsfw":false,"isSystemChannel":false,"position":26,"rawPosition":38,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720689963237407","name":"shoah-gang","topic":null,"nsfw":false,"isSystemChannel":false,"position":27,"rawPosition":39,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720690390794251","name":"code","topic":null,"nsfw":false,"isSystemChannel":false,"position":28,"rawPosition":40,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720690894241833","name":"magic-hitler-bot","topic":null,"nsfw":false,"isSystemChannel":false,"position":29,"rawPosition":41,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720692295139339","name":"logs-bar","topic":null,"nsfw":false,"isSystemChannel":false,"position":30,"rawPosition":42,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720693318680598","name":"tchernobyl","topic":null,"nsfw":false,"isSystemChannel":false,"position":31,"rawPosition":43,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720693968797712","name":"brigade-d3tr","topic":null,"nsfw":false,"isSystemChannel":false,"position":32,"rawPosition":44,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720694614458388","name":"vcs-bar","topic":null,"nsfw":false,"isSystemChannel":false,"position":33,"rawPosition":45,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720695298129921","name":"surveillance","topic":null,"nsfw":false,"isSystemChannel":false,"position":34,"rawPosition":46,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720696183259136","name":"bots-destructeurs","topic":null,"nsfw":false,"isSystemChannel":false,"position":35,"rawPosition":47,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720696799952896","name":"info-privée","topic":null,"nsfw":false,"isSystemChannel":false,"position":36,"rawPosition":48,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720697584287754","name":"le-royaume","topic":null,"nsfw":false,"isSystemChannel":false,"position":37,"rawPosition":49,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720698229948416","name":"général","topic":null,"nsfw":false,"isSystemChannel":false,"position":38,"rawPosition":50,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720698838253568","name":"frontiere","topic":null,"nsfw":false,"isSystemChannel":false,"position":39,"rawPosition":51,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720699987623947","name":"humour-noir","topic":null,"nsfw":false,"isSystemChannel":false,"position":40,"rawPosition":52,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720701086269466","name":"selfbots","topic":null,"nsfw":false,"isSystemChannel":false,"position":41,"rawPosition":53,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720703158255616","name":"tokens-kanna","topic":null,"nsfw":false,"isSystemChannel":false,"position":42,"rawPosition":54,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720703808372743","name":"règlement-stagiaire","topic":null,"nsfw":false,"isSystemChannel":false,"position":43,"rawPosition":55,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720704328466443","name":"fc-hagra","topic":null,"nsfw":false,"isSystemChannel":false,"position":44,"rawPosition":56,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720705880621057","name":"commandes-bar","topic":null,"nsfw":false,"isSystemChannel":false,"position":45,"rawPosition":57,"parentCat":null,"permLocked":false,"permOverwrites":[]},{"id":"483720706475950082","name":"general","topic":null,"nsfw":false,"isSystemChannel":false,"position":46,"rawPosition":58,"parentCat":null,"permLocked":false,"permOverwrites":[]}],"voiceChannel":[],"emojis":[],"bans":[{"userId":"374997960557199370","reason":"Blacklist bot BAR. motif : spam "},{"userId":"452895809441103872","reason":"Blacklist bot BAR. motif : test "}]}

Command based suggestion

It would be epic if theres a way to make this command based. For example a certain user id can use these commands in a guild to backup, restore and clone.

401 Unauthorized

Please describe the problem you are having in detail:
Error when the bot try to delete something

Please describe the problem in as much detail as possible. Please include any thrown error codes as well.
DiscordAPIError: 401: Unauthorized
at RequestHandler.execute (C:\Users\Auvic\Desktop\Newp\node_modules\discord.js\src\rest\RequestHandler.js:170:25)
at processTicksAndRejections (internal/process/task_queues.js:86:5)

Additional information:

  • Node.js version: Last Version.
  • Operating system: Win 10 x64

TypeError: NewguildAdminRole.permissions.has is not a function

Keep getting this error TypeError: NewguildAdminRole.permissions.has is not a function

[28.02.2018 17:20:12] TypeError: newGuildAdminRole.permissions.has is not a function at Function.validateSettings (C:\Users\Jake\Desktop\Discord-guild-copy-master\objects\validator.js:35:44) at Client.client.on (C:\Users\Jake\Desktop\Discord-guild-copy-master\copy.js.js:24:47) at emitNone (events.js:111:20) at Client.emit (events.js:208:7) at WebSocketConnection.triggerReady (C:\Users\Jake\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:123:17) at WebSocketConnection.checkIfReady (C:\Users\Jake\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:139:61) at GuildCreateHandler.handle (C:\Users\Jake\node_modules\discord.js\src\client\websocket\packets\handlers\GuildCreate.js:13:31) at WebSocketPacketManager.handle (C:\Users\Jake\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65) at WebSocketConnection.onPacket (C:\Users\Jake\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:330:35) at WebSocketConnection.onMessage (C:\Users\Jake\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:293:17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.