Check timeouts that have been issued

Is there a way to get a list of timeouts for users on a guild similar to Guild.bans? My specific use case: I need to check if a timeout has been issued for a specific user even if they aren't in the server, which guild.members.fetch(...)..communicationDisabledUntil !== null doesn't work for.
9 Replies
d.js toolkit
d.js toolkit•6mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
treble/luna
treble/luna•6mo ago
i dont think thats possible
Danial
Danial•6mo ago
You could fetch all the members and then filter using isCommunicationDisabled()
d.js docs
d.js docs•6mo ago
method GuildMember#isCommunicationDisabled() Whether this member is currently timed out
jr
jr•6mo ago
Thanks, I'm mainly needing a way to get this info even if the user isn't in the guild anymore
Danial
Danial•6mo ago
Oh wait, I misread, you could check audit logs
jr
jr•6mo ago
That might be the way to go Ty 🙂
treble/luna
treble/luna•6mo ago
you can also store the timeouts yourself
Danial
Danial•6mo ago
Yeah, audit logs can be a handful so I'd just check when they get timed out and store them somewhere