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

236
Views
¿Cómo puedo verificar un rol específico en un gremio diferente y convertirlo en un valor booleano?
const Command = require("../../Ana/Command") const config = require("../../config.json") const prefix = config.prefix; module.exports = new Command({ name: "team", aliases: ["tm"], description: "Gives you your desired team.", category: "Gamemaster", run: async (bot, message, args, client, Discord) => { await message.reply("Please wait!").then(async msg => { var command = message.content.slice(prefix.length).split(" ")[0], topic = message.content.split(" ")[1]; const isTRO = message.member.roles.cache.some(role => role.id === '948567643194003476') //Checks if you have a role in a different server, the bot is invited in that specific server switch (command) { case "team": if (!topic) return message.channel.send('no team selected.... are you kid??'); if (topic === "TRO") { return message.channel.send("Checking if you have access to TRO.") if (isTRO = 'true') { message.reply('You have access to TRO.') } } } }) } })

he probado varias soluciones

Estoy tratando de verificar un rol específico en un gremio y dar un rol en el gremio "Actual".

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede usar el método message.member.roles.cache.has() para verificar si tienen un rol.

 message.member.roles.cache.has('948567643194003476');
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!