Skip to content

Some permission check getters do not check timeout and other properties #11192

@vakiliner

Description

@vakiliner

Which package is this bug report for?

discord.js

Issue description

Timeout not checked (Related #9730):

  • GuildEmoji.deletable
  • GuildInvite.deletable
  • GuildMember.moderatable
  • GuildMember.kickable
  • GuildMember.bannable
  • Message.editable
  • Message.pinnable
  • Message.crosspostable

Timeout is not checked with additional conditions (Related #9730):

  • Message.bulkDeletable When the message was sent by the client
  • ThreadChannel.editable When the thread was created by the client
  • ThreadChannel.joinable When the thread is private

Permission errors:

  • Message.pinnable ReadMessageHistory is not checked
  • Message.pinnable Doesn't check if the channel supports pins
  • ThreadChannel.editable When a thread is created by a client, ViewChannel and SendMessagesInThreads are not checked
  • ThreadChannel.joinable For private threads, ManageThreads is checked, but ViewChannel is not (A similar case with VoiceChannel.manageable Incorrect calculation of permissions for the voice channel #11116)
  • ThreadChannel.manageable ViewChannel and SendMessagesInThreads are not checked
  • ThreadChannel.sendable ViewChannel is not checked
  • ThreadChannel.sendable When the thread is locked and archived ManageThreads is checked, but not when the thread is only locked
  • ThreadMember.manageable When a public thread is created by a client, ManageThreads is not checked

Code sample

There is automated check code, but it is large
See https://github.com/vakiliner/discordjs-error-tests
If you want, you can use it, or reproduce the issues manually

Versions

discord.js - 15.0.0-dev.1761134503-697556fd1
nodejs - v25.0.0
TypeScript - Version 5.9.3
Windows 10

Issue priority

Low (slightly annoying)

Which partials do you have configured?

No Partials

Which gateway intents are you subscribing to?

Guilds, GuildMembers, GuildPresences, GuildMessages, MessageContent

I have tested this issue on a development release

697556f

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions