How to check if the user has the permission "manage posts"

Hi,

I would like to know how I can check if a user has the "ManagePosts" permission? Indeed, this permission doesn't seem to exist in DiscordJS but that's what it's called on Discord

Versions

  • Discord.JS arrow 14.7.1
  • Node.JS arrow 18.12.1
# Code
// message: Message<true>
// thread: AnyThreadChannel<true>

const userId = message.author.id;
// The permission ManagePosts doesn't exist...
if (!thread.permissionsFor(userId)?.has("ManagePosts")) { 
     return;
}
Was this page helpful?