Dynamic overflow categories

This commit is contained in:
indifferentketchup
2026-03-28 20:55:36 -05:00
parent 6b4fd65d4b
commit 1496a96274
10 changed files with 679 additions and 584 deletions

View File

@@ -10,7 +10,19 @@ const channelQueue = new PQueue({
});
function enqueueRename(channel, newName) {
return channelQueue.add(() => channel.setName(newName));
return channelQueue.add(async () => {
try {
await channel.setName(newName);
} catch (err) {
const msg = err?.message || String(err);
if (msg.includes('429') || msg.toLowerCase().includes('rate limit')) {
console.warn(`enqueueRename: rate limit renaming channel "${channel.name}"`);
return;
}
console.error('enqueueRename:', err);
throw err;
}
});
}
function enqueueMove(channel, categoryId) {