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.

143 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

Leave a Comment