admin管理员组

文章数量:1291310

How do I add the timeout function in discord.js ?

Please note I'm talking about the new timeout feature, not like assigning a mutedrole

How do I add the timeout function in discord.js ?

Please note I'm talking about the new timeout feature, not like assigning a mutedrole

Share Improve this question asked Jan 10, 2022 at 9:46 Abhinav AAbhinav A 211 gold badge1 silver badge3 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

According to discord.js's documentation, you need to use GuildMember#timeout, so your code should look something like this:

guildMember.timeout(5 * 60 * 1000)
.then(() => console.log("Member has been timed out"))
.catch(console.log);

本文标签: javascriptTimeout Feature DiscordjsStack Overflow