Make presence clear async, clean up temp session code

This commit is contained in:
Rory& committed 2026-04-13 22:41:57 +02:00
1 parent 05fba68bb3
commit e0204f76cf
4 files changed
+23 -22

No files matched your search

+1 -5
View File
@@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { arrayDistinctBy, arrayGroupBy, Config, EmbedCache, emitEvent, Message, MessageUpdateEvent, normalizeUrl, OrmUtils } from "@spacebar/util";
import { arrayDistinctBy, arrayGroupBy, Config, EmbedCache, emitEvent, Message, MessageUpdateEvent, normalizeUrl, OrmUtils, sleep } from "@spacebar/util";
import { Embed, EmbedImage, EmbedType } from "@spacebar/schemas";
import * as cheerio from "cheerio";
import crypto from "crypto";
@@ -572,10 +572,6 @@ export async function dropDuplicateCacheEntries(entries: EmbedCache[]): Promise<
);
}
async function sleep(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
// hack to make nodejs not die
function getSlowdownFactor(off: number) {
if (off < 10) return off;