Skip to content

Commit 866ff38

Browse files
committed
Use setTimeout from node
1 parent 7fa43d3 commit 866ff38

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/utils/embedUtils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { setTimeout } from "node:timers/promises";
12
import type { Message } from "discord.js";
23

34
const EMBED_WAIT_MS = 5000;
@@ -12,7 +13,7 @@ export async function replyWithFallbackEmbed(message: Message<true>, fallbackUrl
1213
allowedMentions: { repliedUser: false },
1314
});
1415

15-
await new Promise(resolve => setTimeout(resolve, EMBED_WAIT_MS));
16+
await setTimeout(EMBED_WAIT_MS);
1617
const fetched = await reply.fetch();
1718

1819
if (fetched.embeds.length > 0) {

0 commit comments

Comments
 (0)