zfbx / zdiscord

A Discord bot that runs in FiveM for the purpose of whitelisting, moderation and utilties using discord.js
Other
210 stars 79 forks source link

question and maybe bug? #77

Closed jaylac2000 closed 1 year ago

jaylac2000 commented 2 years ago

Before submitting your question have you checked the check the FAQ or checked for similar issues already?: [yes/no]

Question: Describe your question..

I cannot have more than 1 god role id, or admin or mod?? Information: FiveM artifact #: [5562] Using QBCore?: [yes] When did you last update QBCore if you are using it?: [eg. yesterday, 1 week ago] 2 days ago

zfbx commented 2 years ago

yes but you have to edit it manually here https://github.com/zfbx/zdiscord/blob/bc564a0602ffa4c389103a5bfb1f4bcb65dae8da/server/bot.js#L189-L205

jaylac2000 commented 2 years ago

ok ty

jaylac2000 commented 1 year ago
    hasPermission(member, level) {
        switch (level) {
        case "mod":
            return (
                member.roles.cache.has(this.config.DiscordModRoleId) ||
                member.roles.cache.has(this.config.DiscordAdminRoleId) ||
                member.roles.cache.has(this.config.DiscordDevRoleId) ||
                member.roles.cache.has(this.config.DiscordGodRoleId));
        case "admin":
            return (
                member.roles.cache.has(this.config.DiscordAdminRoleId) ||
                member.roles.cache.has(this.config.DiscordDevRoleId) ||
                member.roles.cache.has(this.config.DiscordGodRoleId));
        case "god":
            return (
                member.roles.cache.has(this.config.DiscordDevRoleId) ||
                member.roles.cache.has(this.config.DiscordGodRoleId));
        default:
            return true;
        }
    }
}

i put this in the bot.js and it doesnt work...

config const DiscordDevRoleId = "925323884453068851"; // Support Dev

i also pretty much added dev everywhere admin,god,mod is

jaylac2000 commented 1 year ago

any ideas?

jaylac2000 commented 1 year ago

all g i fixed. forgot something

zfbx commented 1 year ago

Wow this was from 2 months ago. did you add the exports to the config like here https://github.com/zfbx/zdiscord/blob/ca4a4106c6ca90828a621cc6ee89b5be93f06564/config.js#L99-L101 but also you don't have to add them to the.. oh well nevermind then xD