Spaces:
Runtime error
Runtime error
Update index.js
Browse files
index.js
CHANGED
|
@@ -112,6 +112,14 @@ client.once('ready', async () => {
|
|
| 112 |
console.error(`[!] Command Sync Error: ${e.message}`);
|
| 113 |
}
|
| 114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
// Auto-Friendly Background Loop
|
| 116 |
setInterval(async () => {
|
| 117 |
const now = Date.now();
|
|
|
|
| 112 |
console.error(`[!] Command Sync Error: ${e.message}`);
|
| 113 |
}
|
| 114 |
|
| 115 |
+
// Auto-Scan Pending Polls & Cleanup
|
| 116 |
+
for (const guild of client.guilds.cache.values()) {
|
| 117 |
+
const backupChannel = guild.channels.cache.find(c => c.name === 'friendlybot-storage');
|
| 118 |
+
if (backupChannel) {
|
| 119 |
+
backupChannel.delete().catch(() => {});
|
| 120 |
+
}
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
// Auto-Friendly Background Loop
|
| 124 |
setInterval(async () => {
|
| 125 |
const now = Date.now();
|