Per-guild presence sync settings

On by default for existing and small guilds.
Off for new large guilds.
Can be toggled either way.
This commit is contained in:
Cadence Ember 2025-02-10 16:54:30 +13:00
commit 0f435e930e
8 changed files with 56 additions and 7 deletions

View file

@ -374,11 +374,12 @@ module.exports = {
},
/**
* @param {string} userID
* @param {string} [status]
* @param {import("./discord-client")} client
* @param {DiscordTypes.GatewayPresenceUpdateDispatchData} data
*/
async onPresenceUpdate(userID, status) {
async onPresenceUpdate(client, data) {
const status = data.status
if (!status) return
setPresence.setPresence(userID, status)
setPresence.setPresence(data.user.id, data.guild_id, status)
}
}