How to timeout

How to timeout/?
22 Replies
d.js toolkit
d.js toolkit2y 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
grass2y ago
member.timeout
d.js docs
d.js docs2y ago
Documentation suggestion for @fuzzx:method GuildMember#timeout() Times this guild member out.
FuzzX
FuzzXOP2y ago
ok I have a question I have an integer input
grass
grass2y ago
okay
FuzzX
FuzzXOP2y ago
and I multiply it by 1000 in the timeout thing
grass
grass2y ago
okay
FuzzX
FuzzXOP2y ago
but it only timeouts for 1 min
grass
grass2y ago
what’re you inputting
FuzzX
FuzzXOP2y ago
when the input is 60mins
grass
grass2y ago
you’re typing 60mins on an integer option?
FuzzX
FuzzXOP2y ago
no 60
grass
grass2y ago
yeah 60 * 1000 ms
FuzzX
FuzzXOP2y ago
and I multiply by 1000
grass
grass2y ago
60 seconds the *1000 turns ms into seconds
FuzzX
FuzzXOP2y ago
oh so *10000 ty
grass
grass2y ago
what
FuzzX
FuzzXOP2y ago
wait so minutes times 60000
grass
grass2y ago
1000 milliseconds in a second 60 seconds in a minute so yes
FuzzX
FuzzXOP2y 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
grass2y ago
define member
d.js docs
d.js docs2y 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
Want results from more Discord servers?
Add your server