Compare commits
No commits in common. "24a1b2acec351a630de878e4be8994b63906eec9" and "d993d8fc478a50cf3acab2fb16853f7504d5ce09" have entirely different histories.
24a1b2acec
...
d993d8fc47
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -132,5 +132,4 @@ config.json
|
||||||
channels.db
|
channels.db
|
||||||
private/
|
private/
|
||||||
error/
|
error/
|
||||||
old/
|
old/
|
||||||
package-lock.json
|
|
|
@ -26,6 +26,7 @@
|
||||||
"username": "YOUR_USERNAME",
|
"username": "YOUR_USERNAME",
|
||||||
"password": "YOUR_PASSWORD"
|
"password": "YOUR_PASSWORD"
|
||||||
},
|
},
|
||||||
|
,
|
||||||
"uptime-kuma": {
|
"uptime-kuma": {
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
"url": "",
|
"url": "",
|
||||||
|
|
19
index.js
19
index.js
|
@ -763,25 +763,6 @@ discord.on('ready', async () => {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
}, 10000)
|
}, 10000)
|
||||||
|
|
||||||
// Check all channels in DB, fetch them, if they dont exist, delete all subscriptions
|
|
||||||
db.all(`SELECT channelid FROM channels`, (err, rows) => {
|
|
||||||
if (err) {
|
|
||||||
console.error(err.message);
|
|
||||||
}
|
|
||||||
rows.forEach((row) => {
|
|
||||||
const channel = discord.channels.cache.get(row.channelid);
|
|
||||||
if (!channel) {
|
|
||||||
// Delete the channel from the database and return
|
|
||||||
return db.run(`DELETE FROM channels WHERE channelid = ?`, [row.channelid], (err) => {
|
|
||||||
if (err) {
|
|
||||||
console.error(err.message);
|
|
||||||
}
|
|
||||||
console.log(`${colors.cyan("[INFO]")} Deleted channel ${row.channelid} from database`);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
discord.on("interactionCreate", async (interaction) => {
|
discord.on("interactionCreate", async (interaction) => {
|
||||||
|
|
8169
package-lock.json
generated
Normal file
8169
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue