userse
Hello, what is the correct event I need to use in order to monitor a permission that changed on specific channel, for example if a "everyone" role ViewChannel/Connect permission has been changed to 'x'
19 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.i assume it would be in a channelUpdate event, but i'm not sure, if not you can try via audit logs
Currently I am using channelUpdate, but it has so High Frequency, there is so many triggers for that event that I cant just return them
just filter them out
The only thing i could think about is that i check the type and I only react if its a voice channel, is there more check i could do?
Because I still see in console alot of request coming
And the paramters it give not contains propeties that I use
just filter on whether the permissionOverwrites have changed or not
somtimes its not giving a parameter of permissionOverwrites and when I try to access the propety the bot crash unless i do try catch
show your code
^
you dont have to ping me for every message you send
I am sorry, my bad, habbit
and is it your oldCHannel that sometimes has no or little properties?
I dont exeactly know the reason yet, still trying to understand whats going on, but the bot is currently running and somtimes I will get like 20 console.error and I dont know what triggers it
But it all points to that event
do you happen to have Partials enabled in your client?
can you show the errors you get
I will have to wait until the bot crash again, unfortunately I didnt save the error, just reboot the bot and the error gone
i'm suspecting your 'oldChannel' might be a partial on some occasions
would explain why not all properties are present if any