I am currently working on my first Discord bot and I wanted to unpin all pinned messages in a specific channel. However, I have no idea how to get all the pinned messages.
I tried to use message.channel.messages.fetchPinned().array() to get an array of all pinned messages, but then I get an error that fetchPinned().array() is not a function. What am I doing wrong?