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

165
Views
How to put saved role ID's from mongo into a Discord channels permissions?

I am trying to put many saved discord role ID's into a channel, they are all saved into mongo, but when I put something in it says it is not a user nor a role, this is what I tried to do:

const results = await addmodSchema.findOne({
      _id: guild.id
    })
    ButtonInteraction.guild.channels.create(`${ButtonInteraction.user.tag}`, {
      type: "text",
      permissionOverwrites: [
        {
          id: ButtonInteraction.user.id,
          allow: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'],
        },
        {
          id: ButtonInteraction.guild.roles.everyone,
          deny: ['VIEW_CHANNEL', 'READ_MESSAGE_HISTORY']
        },
       {
        id: results.foreach(roles),
        allow: ['VIEW_CHANNEL', 'READ_MESSAGE_HISTORY', 'MANAGE_CHANNEL']
        }
      ],
    })
about 4 years ago · Juan Pablo Isaza
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!