Merge branch 'dev' into production
This commit is contained in:
@@ -14,6 +14,7 @@ const client = new Client({
|
||||
intents: [
|
||||
GatewayIntentBits.Guilds,
|
||||
GatewayIntentBits.GuildPresences,
|
||||
GatewayIntentBits.GuildMembers,
|
||||
],
|
||||
});
|
||||
|
||||
@@ -86,7 +87,14 @@ function updateAll() {
|
||||
client.on("clientReady", () => {
|
||||
console.log(`Bot online as ${client.user.tag}`);
|
||||
client.user.setActivity("Watching Presence", { type: ActivityType.Watching });
|
||||
for (const guild of client.guilds.cache.values()) {
|
||||
guild.members.fetch(TARGET_USER_ID).then(() => {
|
||||
console.log(`Found user ${TARGET_USER_ID} in guild ${guild.name}`);
|
||||
updateAll();
|
||||
}).catch((err) => {
|
||||
console.error(`Could not fetch user ${TARGET_USER_ID} in guild ${guild.name}:`, err.message);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
client.on("presenceUpdate", () => {
|
||||
|
||||
Reference in New Issue
Block a user