#Track user activity (Discord.js / ActivityType)
4 messages · Page 1 of 1 (latest)
I'm starting to think ActivityType is only to set the bot's activities and not track others? not sure
client.on('presenceUpdate', (oldPresence, newPresence) => {
let member = newPresence.member;
let activity = member.presence.activities[0];
let channel = member.guild.channels.cache.get('1256434415790194799');
if (member.id === '418119204978425861') {
if (!member.presence.activities || member.presence.activities.length == 0) {
channel.send("@marble nest Antonio no está jugando a nada.");
} else if (activity.type.toLowerCase() === "playing") {
channel.send(`@marble nest Antonio está jugando a ${activity.name}.`);
}
}```
this is the version I get it to work, but if I want to track also the custom activity, they overwrite each other