How to make modlogging when user got timeout and unmute(remove timeout) using audit log events

I want to make a modlogging system when user got timeout and unmute and the bot have to send log in a specific channel using audit log events
42 Replies
d.js toolkit
d.js toolkit9mo 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! - Marked as resolved by OP
axiprime
axiprime9mo ago
Log the event : guildAuditLogEntryCreate
Discord.js
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
axiprime
axiprime9mo ago
You can also use the voiceStateUpdate
Discord.js
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
NOT DELTA
NOT DELTA9mo ago
What is the event for timeout and unmute I can't get that
axiprime
axiprime9mo ago
I believe for timeout you can get it in the guildMemberUpdate But i'm sure you getting it in the log
NOT DELTA
NOT DELTA9mo ago
I already tried the guildMemberUpdate event , I want to log the particular timeout and remove timeout event , so is there any particular data entry for it
axiprime
axiprime9mo ago
You can remove it with the <guildmember>.timeout(null,reason) Just listen to the events and look which one trigger.
NOT DELTA
NOT DELTA9mo ago
I already have timeout, unmute commands , but I don't know the logging functions
axiprime
axiprime9mo ago
When someone getting muted, in the auditlog you have an executor and a target
NOT DELTA
NOT DELTA9mo ago
So then
NOT DELTA
NOT DELTA9mo ago
I got this @Axiprime
No description
NOT DELTA
NOT DELTA9mo ago
Now I want to log this so what should I do
axiprime
axiprime9mo ago
Add a listener to this event log what happen when you mute someone You get all the info
NOT DELTA
NOT DELTA9mo ago
What kind of
axiprime
axiprime9mo ago
guildAuditLogEntryCreate is the event
Want results from more Discord servers?
Add your server