How to timeout

How to timeout/?
22 Replies
d.js toolkit
d.js toolkit14mo ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
grass
grass14mo ago
member.timeout
d.js docs
d.js docs14mo ago
Documentation suggestion for @fuzzx:method GuildMember#timeout() Times this guild member out.
FuzzX
FuzzX14mo ago
ok I have a question I have an integer input
grass
grass14mo ago
okay
FuzzX
FuzzX14mo ago
and I multiply it by 1000 in the timeout thing
grass
grass14mo ago
okay
FuzzX
FuzzX14mo ago
but it only timeouts for 1 min
grass
grass14mo ago
what’re you inputting
FuzzX
FuzzX14mo ago
when the input is 60mins
grass
grass14mo ago
you’re typing 60mins on an integer option?
FuzzX
FuzzX14mo ago
no 60
grass
grass14mo ago
yeah 60 * 1000 ms
FuzzX
FuzzX14mo ago
and I multiply by 1000
grass
grass14mo ago
60 seconds the *1000 turns ms into seconds
FuzzX
FuzzX14mo ago
oh so *10000 ty
grass
grass14mo ago
what
FuzzX
FuzzX14mo ago
wait so minutes times 60000
grass
grass14mo ago
1000 milliseconds in a second 60 seconds in a minute so yes
FuzzX
FuzzX14mo ago
k ty I got this error:
let timeout = await member.timeout(length * 60000, reason).catch((err) => {
^

TypeError: member.timeout is not a function
at InteractionCollector.<anonymous> (C:\Users\marek\Desktop\Beehive Manager\src\commands\Moderation\modpanel.js:112:44)
at InteractionCollector.emit (node:events:524:35)
at InteractionCollector.handleCollect (C:\Users\marek\Desktop\Beehive Manager\node_modules\discord.js\src\structures\interfaces\Collector.js:133:14)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v19.8.1
let timeout = await member.timeout(length * 60000, reason).catch((err) => {
^

TypeError: member.timeout is not a function
at InteractionCollector.<anonymous> (C:\Users\marek\Desktop\Beehive Manager\src\commands\Moderation\modpanel.js:112:44)
at InteractionCollector.emit (node:events:524:35)
at InteractionCollector.handleCollect (C:\Users\marek\Desktop\Beehive Manager\node_modules\discord.js\src\structures\interfaces\Collector.js:133:14)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v19.8.1
it worked fine a few minutes ago
grass
grass14mo ago
define member
d.js docs
d.js docs14mo ago
Despite sounding similar there is a distinct difference between users and members in Discord: • User: global Discord user data (global avatar, username, tag, id) • GuildMember: user data associated to a guild (guild, nickname, roles, voice, guild avatar, etc.) • Conversion: User ➞ GuildMember | GuildMember ➞ User