“Statusrolle diskordt.js” Code-Antworten

Holen Sie sich diskord.js Rolle

let role = message.guild.roles.cache.find(r => r.id === "Role ID");

// The member you want to add the role to
let member = message.mentions.members.first();

// Add role to the member
member.roles.add(role);

// Or add it to yourself
message.author.roles.add(role);
Blushing Bee

Statusrolle diskordt.js

const client = require("@root");

client.on("presenceUpdate", (oldPresence, newPresence) => {
    const role = newPresence.guild.roles.cache.get("role-id-goes-here");
    const member = newPresence.member;
    const activities = newPresence.member.presence.activities[0];
    if(!member || !activities) return;
    if (activities && (activities.state.includes("kmgo.xyz"))) {
        return member.roles.add(role)
    } else {
        if (member.roles.cache.get(role.id)) {
            member.roles.remove(role)
        }
    }
})
dano

Ähnliche Antworten wie “Statusrolle diskordt.js”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen