Move Logs

How to create a move logs if the targetId isn't accessible through both "voiceStateUpdate" & "GuildAuditLogEntryCreate" events; Even though I tried to cache when the "users" value got changed in the auditlogs but still not possible to get it accurately.
14 Replies
d.js toolkit
d.js toolkit5mo 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!
monbrey
monbrey5mo ago
What do you mean it's not accessible? If someone's voice state changes you definitely know who it was What's missing?
255
255OP5mo ago
I mean when someone got moved, the auditlogs can't reach to the "targetId" value; It's always null
monbrey
monbrey5mo ago
Then Discord doesnt provide it
255
255OP5mo ago
so what is the best way to get the MemberMove logs?
az.5577
az.55775mo ago
Do you want to log who moved member xyz or member moved from xyz to xyz
255
255OP5mo ago
I want to log the both also the member who got moved
az.5577
az.55775mo ago
No description
az.5577
az.55775mo ago
like so?
255
255OP5mo ago
needs to show he moved by whom as well
az.5577
az.55775mo ago
You can just
fetchAuditLog({type: MEMBER_MOVE, limit: 1})
fetchAuditLog({type: MEMBER_MOVE, limit: 1})
inside your voicestateuodate It should work
az.5577
az.55775mo ago
Discord Developer Portal
Discord Developer Portal — API Docs for Bots and Developers
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
az.5577
az.55775mo ago
Check the docs
255
255OP5mo ago
That's true but in order not to log the self change channel I need to add a createdTimestamp and it should be less than 5 seconds or something but when doing that, it won't log the old Auditlogs with a MOVE_MEMBER Type because not all logs are gonna create a new Auditlog some of them will just edit the "users" value and just increasing the amount of users
Want results from more Discord servers?
Add your server