#How to filter MemberUpdates for Timouts

3 messages · Page 1 of 1 (latest)

solar heath
#

Hey, i want do Log Timeouts but there is no AuditLogEvent for example "Member.Timouts".
I need to filter the Member Updates for Timeouts i think, but how?

Can someone help me?

sick slateBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • 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!
  • Marked as resolved by OP
white rampart
#

if you're just checking for timeouts in the MemberUpdate event and don't actually need the audit log entry, you can just check <GuildMember>.isCommunicationDisabled()
it will be false on the old member and true on the new member
if you need the audit log entry, timeouts also fall under AuditLogEvent.MemberUpdate
you'd want to parse <GuildAuditLogsEntry>.changes to ensure it's a timeout