Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

174
Views
Is there a way to remove permissions from a role on creation with Discord?

I'm trying to remove all the permissions from a role that my bot has made on the server, I've looked on Discord JS guide and other websites but there's nothing about it on there, Im basically stuck here's my code:

if (!message.guild.roles.cache.find(i => i.name == 'Muted')) {
    message.channel.send('Adding \`Muted\` Role...')
    await message.guild.roles.create({
        data: {
            name: 'Muted',
            color: '#ff4939',
            permissions: ["ALL", false]
        },
        reason: 'Mute role automaticly added.',
    })
}
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

To remove all permissions from a role on creation, provide an empty array.

await message.guild.roles.create({
    data: {
        name: 'Muted',
        color: '#ff4939',
        permissions: [] //should have no permissions
    },
    reason: 'Mute role automaticly added.',
})
about 4 years ago · Juan Pablo Isaza Report

0

permissions: new Discord.Permissions() should give no permissions, since it works the same as the permissions calculator. Permissions can be either a string, number, array or made by the Permissions constructor using bits.

PermissionResolvable - v12

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!