Skip to content

Commit

Permalink
fix(Message): make pinnable always return a boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
ImRodry committed Sep 3, 2021
1 parent 3bfb4ef commit 1183a63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/structures/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,9 @@ class Message extends Base {
* @readonly
*/
get pinnable() {
return (
return Boolean(
this.type === 'DEFAULT' &&
(!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)),
);
}

Expand Down

0 comments on commit 1183a63

Please sign in to comment.