Brozy123 commited on
Commit
e15e61b
·
verified ·
1 Parent(s): 5051322

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +8 -0
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();