From 779e254bbb68a93ce8410d5c685fa709f6e78d45 Mon Sep 17 00:00:00 2001 From: IThundxr Date: Thu, 4 Apr 2024 13:31:01 -0400 Subject: [PATCH] Update index.ts --- src/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 1f10f61..26797ea 100644 --- a/src/index.ts +++ b/src/index.ts @@ -97,7 +97,9 @@ client.on(Events.ThreadCreate, async (channel) => { ); await message.edit(`${pingRole}`); - setTimeout({ + await sleep(3000) + + if (channel.parent && channel.parent.name === 'support') { await message.edit( `Hello <@!${channel.ownerId}>! Someone will help you shortly, please do not ping moderators or other people and just wait for someone to come help.` @@ -105,8 +107,7 @@ client.on(Events.ThreadCreate, async (channel) => { } else { await message.delete(); } - }, 5000) - } + } } catch (error) { console.error('Error handling ThreadCreate', error); }