-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Open
Description
On 12th January 2026 23rd February 2026, the permissions will be fully split. We should remove manage messages here if and when that happens:
discord.js/packages/discord.js/src/structures/Message.js
Lines 777 to 796 in ee988e3
| /** | |
| * Whether the message is pinnable by the client user | |
| * @type {boolean} | |
| * @readonly | |
| */ | |
| get pinnable() { | |
| const { channel } = this; | |
| if (this.system) return false; | |
| if (!this.guild) return true; | |
| if (!channel?.viewable) return false; | |
| const permissions = channel?.permissionsFor(this.client.user); | |
| if (!permissions) return false; | |
| return ( | |
| permissions.has([PermissionFlagsBits.ReadMessageHistory, PermissionFlagsBits.PinMessages]) || | |
| permissions.has([PermissionFlagsBits.ReadMessageHistory, PermissionFlagsBits.ManageMessages]) | |
| ); | |
| } |