Discord.js-我试图仅充当此命令角色,但返回“ no”

时间:2020-08-08 00:44:14

标签: discord.js

const discord = require("discord.js") //for safe keeping

module.exports.run = async (bot, message, args) =>{

    let role = message.guild.roles.cache.get(roles => roles.id === "741440181940518934")
    let role2 = message.guild.roles.cache.get(roles => roles.id === "741443468773032047")
    let role3 = message.guild.roles.cache.get(roles => roles.id === "741443502256422982")

    let neededRole = message.guild.roles.cache.get("741446040745672717")

    let text = `${args[0]} ${args[1]}`

    if(message.member.roles.cache.has(neededRole)) {

        if (text == 'Fern Green') {

        message.member.roles.add(role)

        } else {
            return message.channel.send("no")
        }
        
        


}

module.exports.help = {
    name: "colour",
    aliases: ['color']
  }

0 个答案:

没有答案