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•11mo 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•11mo ago
i dont think thats possible
Danial
Danial•11mo ago
You could fetch all the members and then filter using isCommunicationDisabled()
d.js docs
d.js docs•11mo ago
method GuildMember#isCommunicationDisabled() Whether this member is currently timed out
jr
jrOP•11mo ago
Thanks, I'm mainly needing a way to get this info even if the user isn't in the guild anymore
Danial
Danial•11mo ago
Oh wait, I misread, you could check audit logs
jr
jrOP•11mo ago
That might be the way to go Ty 🙂
treble/luna
treble/luna•11mo ago
you can also store the timeouts yourself
Danial
Danial•11mo ago
Yeah, audit logs can be a handful so I'd just check when they get timed out and store them somewhere
Want results from more Discord servers?
Add your server