Merge branch 'dev' into production
This commit is contained in:
@@ -14,6 +14,7 @@ const client = new Client({
|
|||||||
intents: [
|
intents: [
|
||||||
GatewayIntentBits.Guilds,
|
GatewayIntentBits.Guilds,
|
||||||
GatewayIntentBits.GuildPresences,
|
GatewayIntentBits.GuildPresences,
|
||||||
|
GatewayIntentBits.GuildMembers,
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -86,7 +87,14 @@ function updateAll() {
|
|||||||
client.on("clientReady", () => {
|
client.on("clientReady", () => {
|
||||||
console.log(`Bot online as ${client.user.tag}`);
|
console.log(`Bot online as ${client.user.tag}`);
|
||||||
client.user.setActivity("Watching Presence", { type: ActivityType.Watching });
|
client.user.setActivity("Watching Presence", { type: ActivityType.Watching });
|
||||||
updateAll();
|
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", () => {
|
client.on("presenceUpdate", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user