Remove guild members intent and possibly fix weird crash

This commit is contained in:
Christopher Cookman 2024-05-10 09:56:11 -06:00
parent 688954fa11
commit f0194d697a
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -14,8 +14,7 @@ const sqlite3 = require("sqlite3").verbose();
const discord = new Discord.Client({
intents: [
"Guilds",
"GuildVoiceStates",
"GuildMembers"
"GuildVoiceStates"
]
});
const {
@ -453,6 +452,15 @@ xmpp.on("online", async (address) => {
}, 1000)
});
xmpp.on("close", () => {
console.log(`${colors.yellow("[WARN]")} XMPP connection closed, trying to reconnect...`);
setTimeout(() => {
xmpp.stop().then(() => {
start();
});
}, 5000);
})
const start = () => {
xmpp.start().catch((err) => {
errCount++;