Skip to content

Commit

Permalink
fix(Message): pinnable returning false in non-DEFAULT messages (#6585)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImRodry committed Sep 9, 2021
1 parent f866512 commit 3183b11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/structures/Message.js
Expand Up @@ -570,9 +570,9 @@ class Message extends Base {
* @readonly
*/
get pinnable() {
return (
this.type === 'DEFAULT' &&
(!this.guild || this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES, false))
return Boolean(
!this.system &&
(!this.guild || this.channel.permissionsFor(this.client.user)?.has(Permissions.FLAGS.MANAGE_MESSAGES, false)),
);
}

Expand Down

0 comments on commit 3183b11

Please sign in to comment.