Remove guild members intent and possibly fix weird crash
This commit is contained in:
parent
688954fa11
commit
f0194d697a
12
index.js
12
index.js
|
@ -14,8 +14,7 @@ const sqlite3 = require("sqlite3").verbose();
|
||||||
const discord = new Discord.Client({
|
const discord = new Discord.Client({
|
||||||
intents: [
|
intents: [
|
||||||
"Guilds",
|
"Guilds",
|
||||||
"GuildVoiceStates",
|
"GuildVoiceStates"
|
||||||
"GuildMembers"
|
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
const {
|
const {
|
||||||
|
@ -453,6 +452,15 @@ xmpp.on("online", async (address) => {
|
||||||
}, 1000)
|
}, 1000)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
xmpp.on("close", () => {
|
||||||
|
console.log(`${colors.yellow("[WARN]")} XMPP connection closed, trying to reconnect...`);
|
||||||
|
setTimeout(() => {
|
||||||
|
xmpp.stop().then(() => {
|
||||||
|
start();
|
||||||
|
});
|
||||||
|
}, 5000);
|
||||||
|
})
|
||||||
|
|
||||||
const start = () => {
|
const start = () => {
|
||||||
xmpp.start().catch((err) => {
|
xmpp.start().catch((err) => {
|
||||||
errCount++;
|
errCount++;
|
||||||
|
|
Loading…
Reference in a new issue