mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-20 05:23:31 +01:00
fix(Message): pinnable returning false in non-DEFAULT messages (#6585)
This commit is contained in:
@@ -570,9 +570,9 @@ class Message extends Base {
|
|||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
get pinnable() {
|
get pinnable() {
|
||||||
return (
|
return Boolean(
|
||||||
this.type === 'DEFAULT' &&
|
!this.system &&
|
||||||
(!this.guild || this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES, false))
|
(!this.guild || this.channel.permissionsFor(this.client.user)?.has(Permissions.FLAGS.MANAGE_MESSAGES, false)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user