diff --git a/src/clientfactory.ts b/src/clientfactory.ts index b2a5baeb9a1886d40201248f3a8323ad884b8815..d93d7fcbad428af678daf93441c2798542397fe5 100644 --- a/src/clientfactory.ts +++ b/src/clientfactory.ts @@ -43,7 +43,7 @@ export class DiscordClientFactory { fetchAllMembers: this.config.usePrivilegedIntents, messageCacheLifetime: 5, ws: { - intents: this.config.usePrivilegedIntents ? Intents.PRIVILEGED : Intents.NON_PRIVILEGED, + intents: this.config.usePrivilegedIntents ? Intents.ALL : Intents.NON_PRIVILEGED, }, }); @@ -69,7 +69,7 @@ export class DiscordClientFactory { fetchAllMembers: false, messageCacheLifetime: 5, ws: { - intents: Intents.NON_PRIVILEGED, + intents: this.config.usePrivilegedIntents ? Intents.ALL : Intents.NON_PRIVILEGED, }, }); @@ -102,7 +102,7 @@ export class DiscordClientFactory { fetchAllMembers: false, messageCacheLifetime: 5, ws: { - intents: Intents.NON_PRIVILEGED, + intents: this.config.usePrivilegedIntents ? Intents.ALL : Intents.NON_PRIVILEGED, }, }); diff --git a/src/presencehandler.ts b/src/presencehandler.ts index ebb7024e3d91fa399a4e374168d089d2977aa612..69bd26322f5d3434ac5bfca52d10e188940eebc6 100644 --- a/src/presencehandler.ts +++ b/src/presencehandler.ts @@ -144,7 +144,7 @@ export class PresenceHandler { const intent = this.bot.GetIntentFromDiscordMember(user); try { await intent.ensureRegistered(); - await intent.underlyingClient.setPresenceStatus(status.Presence, status.StatusMsg); + await intent.underlyingClient.setPresenceStatus(status.Presence, status.StatusMsg || ''); } catch (ex) { if (ex.errcode !== "M_FORBIDDEN") { log.warn(`Could not update Matrix presence for ${user.id}`);