#EASY ISSUE Timeout (Please help)
1 messages · Page 1 of 1 (latest)
You were already answered weren't you? Use setTimeout
Not working
It's not working though
You must not be using it properly
it does, show ur code
then your using it wrong
^
u r using it completely wrong
How do I put that in my code though?
setTimeout(()=>{
},timeInMs)
yep
No
no?
Bruh LOl. One yes and no
please learn js #resources
Put msg.delete() in setTimeout callback
All I'm saying
I know how to do it but just forgot
setTimeout is one of the most basic functions of js
.then(msg => msg.delete setTimeout(()=>{
},timeInMs)
const msg = await message.channel.send("hey");
setTimeout(() => void msg.delete(), 5000);```
example
Don't spoonfeed
Ohhh okay. So wait whats void?
if you dont know, you dont know js
I will try this
setTimeout(() => msg.delete(), 5000);
Actually, I didn't know about it until about 1 week ago
✅
still @gentle kraken please learn js
Okay,
Uhh
.setTimeout(() => msg.delete(), 5000);
This is now just not deleting the message
5000 is like 5 seconds
const enabled = true;
const roleName = 'DJ';
if (enabled) {
const roleDJ = message.guild.roles.cache.find(x => x.name === roleName);
if (!roleDJ) return message.channel.send(`This command is reserved for members with the ${roleName} role on the server`).setTimeout(() => msg.delete(), 5000);
else;
if (!message.member._roles.includes(roleDJ.id)) {
return message.channel.send(`⚠️ - This command is reserved for members with the ${roleName} role on the server`).setTimeout(() => msg.delete(), 5000);
}
}
Ok... yes please learn js... setTimeout is a global function
setTimeout is not a then, u needa us seperately
Bruhhh
I did this before and it worked
please learn js #resources

even you sponfeed them, they still dont know how to use it
This code ligit worked for me but it deletes the messge very fast
.then(msg => msg.delete({ setTimeout: 20000 }));
Please help
Dk how that's the same??
Idk but it worked just deleted the message fast
we dont spoonfeed here please go to #useful-servers if you want spoonfeed
Plzz just help no sppodfeed
we already gave you all the things you need
already give you example ^^
Okay I will try something else and update u yallll
l
Still don't know how to do this
I don't think u learned js in 14 minutes
.then(msg=>{
setTimeout(()=>{
msg.delete()
},5000)})
Thank you.
you could
Now u are spoonfeeding 
ye, ik, just wanted to be done with him
next time just use the damn tag @deep kiln @merry swallow
The timeout option has been removed from the Message#delete method.
- message.delete(5000)
- message.delete({ timeout: 5000 })
+ setTimeout(() => { message.delete() }, 5000)
so its technically not spoonfeeding if we have a tag dedicated for it
and yes, I just pinged you for that
we told him everything on that tag... including the exact function
ok
and? just use the tag next time so they actually get what you mean so you can avoid useless stuff like what happened here
i didnt know there was a tag for that
me neither
now you know