TheLegendTubaGuy
TheLegendTubaGuy
DIAdiscord.js - Imagine an app
Created by TheLegendTubaGuy on 7/5/2023 in #djs-questions
Not getting presence events for server owner
Oh... I bet hiding my activity status does that
16 replies
DIAdiscord.js - Imagine an app
Created by TheLegendTubaGuy on 7/5/2023 in #djs-questions
Not getting presence events for server owner
I'm pretty sure. If I do this, I never see my presence updates:
const { EmbedBuilder, Events } = require('discord.js');
const dayjs = require('dayjs');
const logger = require('../logger');
const {
ANNOUNCE_CHANNEL_ID,
ANNOUNCE_IMAGE_URL,
ANNOUNCE_MESSAGE,
ANNOUNCE_NOTIFY_ROLE_ID,
ANNOUNCE_THUMB_URL,
ANNOUNCE_USER_ID,
} = process.env;

let lastAnnounceSent = dayjs('2020-01-01');

module.exports = {
name: Events.PresenceUpdate,
once: false,
async execute(oldPresence, newPresence) {
const userId = newPresence.userId;
const guild = newPresence.guild;
const liveRole = guild.roles.cache.find((role) => role.name === 'Live Now');
const memberManager = guild.members;
console.log(newPresence);
},
};
const { EmbedBuilder, Events } = require('discord.js');
const dayjs = require('dayjs');
const logger = require('../logger');
const {
ANNOUNCE_CHANNEL_ID,
ANNOUNCE_IMAGE_URL,
ANNOUNCE_MESSAGE,
ANNOUNCE_NOTIFY_ROLE_ID,
ANNOUNCE_THUMB_URL,
ANNOUNCE_USER_ID,
} = process.env;

let lastAnnounceSent = dayjs('2020-01-01');

module.exports = {
name: Events.PresenceUpdate,
once: false,
async execute(oldPresence, newPresence) {
const userId = newPresence.userId;
const guild = newPresence.guild;
const liveRole = guild.roles.cache.find((role) => role.name === 'Live Now');
const memberManager = guild.members;
console.log(newPresence);
},
};
16 replies
DIAdiscord.js - Imagine an app
Created by TheLegendTubaGuy on 7/5/2023 in #djs-questions
Not getting presence events for server owner
okay
16 replies
DIAdiscord.js - Imagine an app
Created by TheLegendTubaGuy on 7/5/2023 in #djs-questions
Not getting presence events for server owner
But I can read the activities of presence for the events that I do get. I just literally never get the event for my user.
[12:37:37.101] DEBUG (35419): Got a presence update for xxx that wasn't streaming
[12:37:39.190] DEBUG (35419): Got a presence update for xxx that wasn't streaming
[12:37:45.680] DEBUG (35419): Got a presence update for xxx that wasn't streaming
[12:37:37.101] DEBUG (35419): Got a presence update for xxx that wasn't streaming
[12:37:39.190] DEBUG (35419): Got a presence update for xxx that wasn't streaming
[12:37:45.680] DEBUG (35419): Got a presence update for xxx that wasn't streaming
I'm checking for "Twitch" activity like this:
const streamingActivity = newPresence.activities.find((activity) => activity.type === 1);
const twitchActivity = newPresence.activities.find((activity) => activity.name === 'Twitch');
const streamingActivity = newPresence.activities.find((activity) => activity.type === 1);
const twitchActivity = newPresence.activities.find((activity) => activity.name === 'Twitch');
But again, that's not my issue. My issue is I never see the presence update events for my user.
16 replies
DIAdiscord.js - Imagine an app
Created by TheLegendTubaGuy on 7/5/2023 in #djs-questions
Not getting presence events for server owner
I do not
16 replies
DIAdiscord.js - Imagine an app
Created by TheLegendTubaGuy on 7/5/2023 in #djs-questions
Not getting presence events for server owner
I'm grabbing all of the privileged intents on client instantiation:
const client = new Client({
intents: [Object.keys(GatewayIntentBits)],
});
const client = new Client({
intents: [Object.keys(GatewayIntentBits)],
});
16 replies
DIAdiscord.js - Imagine an app
Created by TheLegendTubaGuy on 7/5/2023 in #djs-questions
Not getting presence events for server owner
And like I said, I get presence updates for seemingly everyone else in the guild.
16 replies
DIAdiscord.js - Imagine an app
Created by TheLegendTubaGuy on 7/5/2023 in #djs-questions
Not getting presence events for server owner
Yes, to both.
16 replies
DIAdiscord.js - Imagine an app
Created by TheLegendTubaGuy on 7/5/2023 in #djs-questions
Not getting presence events for server owner
14.11.0 node 16.16.0 There's no error as the bot does not receive the presence updates for my user at all.
16 replies