Listing new permissions with channelCreate event - permissionOverwrites
Hello there! I have a log on Discord.JS v12 that is fired on the
channelCreate
event, where it logs some information from that creation, as well as the users & roles that have access to it. This code works on v12, however when trying to convert it to v14 I run into a few errors. If I use the original code with channel.permissionOverwrites.cache.map(perms => perms)
it says that channel.permissionOverwrites.map is not a function
.
So I changed it to channel.permissionOverwrites.cache.map
and now it errors trying to create the Field for the Embed. This is the error below, as well as the code.
6 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
The top bit of the console ^^^ is just me running
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Wdym fields no longer work like that? That is exactly how the docs have it
Anyways, got it to work. Thanks
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Well it worked just like that lol. The issue was with the way the permissionOverwrites was setup
That is how I code all of my embeds