Discord.js bot – creating roles on setup results in RangeError

I’m making a discord bot and in !setup 1 I would like to create a few roles.
I tried this code:`

            message.channel.send(`setting up roles...`);
                data: {
                    name: 'Administrator', 
                    color: 'GOLD', 
                    permissions: ['ADMINISTRATOR']
                data: {
                     name: 'Moderator',
                     color: 'GREEN', 
                     permissions: {
                         KICK_MEMBER : true,
                         MANAGE_MESSAGES: true,
                         MENTION_EVERYONE: true,
                         MUTE_MEMBERS: true,
                         CHANGE_NICKNAME: true,
                         MANAGE_NICKNAMES: true,

                data: { 
                    name: 'Muted',
                    permissions: {
                        SEND_MESSAGES: false,
                        ADD_REACTIONS: false,

but I’m getting the following error:

RangeError [BITFIELD_INVALID]: Invalid bitfield flag or number.

Does anyone know how to fix this?

Earlier on I defined guild.

204 thoughts on “Discord.js bot – creating roles on setup results in RangeError”

  1. What i don’t understood is in reality how you are now not actually
    a lot more neatly-appreciated than you might be now. You are very intelligent.
    You already know therefore significantly relating to this matter, produced me individually believe
    it from so many various angles. Its like women and
    men don’t seem to be interested unless it’s something to do with Girl gaga!

    Your own stuffs outstanding. All the time maintain it
    up! http://www.deinformedvoters.org/hydroxychloroquine

  2. Pingback: viagra cost
  3. Pingback: viagra generic
  4. Pingback: cialis oral
  5. Pingback: how to buy cialis
  6. Pingback: cialis australia
  7. Pingback: viagra online
  8. Pingback: viagra
  9. Pingback: sildenafil
  10. Pingback: liquid cialis
  11. Pingback: otc viagra bangkok
  12. Pingback: sildenafil generic
  13. Pingback: female viagra
  14. Pingback: herbal viagra
  15. Pingback: viagra otc
  16. Pingback: viagra walmart
  17. Pingback: women take viagra
  18. Pingback: viagra use
  19. Pingback: generic viagra
  20. Pingback: viagra naturel
  21. Pingback: doctor x viagra
  22. Pingback: otc viagra
  23. Pingback: female viagra pill
  24. Pingback: hims sildenafil
  25. Pingback: buy viagra cheap
  26. Pingback: cialis best price
  27. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make
    your point. You obviously know what youre talking about,
    why throw away your intelligence on just posting videos to your blog when you
    could be giving us something informative to read?

  28. A motivating discussion is worth comment. There’s no doubt that that you ought
    to write more about this subject, it may not be a taboo subject but usually people
    don’t discuss such topics. To the next! Cheers!!

  29. Definitely believe that which you said. Your favorite justification appeared to be
    on the web the easiest thing to be aware of. I say to you,
    I certainly get irked while people think about worries that they plainly do not know about.
    You managed to hit the nail upon the top
    and defined out the whole thing without having side effect , people can take a signal.
    Will probably be back to get more. Thanks

  30. Greate article. Keep posting such kind of information on your blog.
    Im really impressed by it.
    Hello there, You have done an excellent job.
    I’ll certainly digg it and individually suggest to my friends.
    I am sure they’ll be benefited from this web site.

  31. I know this if off topic but I’m looking into
    starting my own blog and was curious what all is required to get setup?

    I’m assuming having a blog like yours would cost a pretty penny?
    I’m not very internet smart so I’m not 100% sure. Any tips or advice
    would be greatly appreciated. Thanks

  32. We absolutely love your blog and find a lot of your post’s to be just
    what I’m looking for. Would you offer guest writers to write content available for you?
    I wouldn’t mind publishing a post or elaborating on a few of the subjects you write concerning here.
    Again, awesome weblog!

  33. Hello, Neat post. There’s a problem together with your web
    site in web explorer, would check this? IE still is the market chief and
    a big portion of other people will miss your fantastic writing
    due to this problem.

  34. Having read this I thought it was extremely enlightening.
    I appreciate you taking the time and effort to put this
    information together. I once again find myself personally spending a
    lot of time both reading and commenting. But so what, it
    was still worthwhile!