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
d.js toolkit
d.js toolkit13mo ago
• 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.
treble/luna
treble/luna13mo ago
i assume it would be in a channelUpdate event, but i'm not sure, if not you can try via audit logs
GMS
GMS13mo ago
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
treble/luna
treble/luna13mo ago
just filter them out
GMS
GMS13mo ago
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
treble/luna
treble/luna13mo ago
just filter on whether the permissionOverwrites have changed or not
GMS
GMS13mo ago
somtimes its not giving a parameter of permissionOverwrites and when I try to access the propety the bot crash unless i do try catch
treble/luna
treble/luna13mo ago
show your code
GMS
GMS13mo ago
GMS
GMS13mo ago
^
treble/luna
treble/luna13mo ago
you dont have to ping me for every message you send
GMS
GMS13mo ago
I am sorry, my bad, habbit
treble/luna
treble/luna13mo ago
and is it your oldCHannel that sometimes has no or little properties?
GMS
GMS13mo ago
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
treble/luna
treble/luna13mo ago
do you happen to have Partials enabled in your client?
GMS
GMS13mo ago
treble/luna
treble/luna13mo ago
can you show the errors you get
GMS
GMS13mo ago
I will have to wait until the bot crash again, unfortunately I didnt save the error, just reboot the bot and the error gone
treble/luna
treble/luna13mo ago
i'm suspecting your 'oldChannel' might be a partial on some occasions would explain why not all properties are present if any