Skip to content

Commit

Permalink
fix(Message#pinnable): you can't pin system messages (discordjs#3279)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdistin authored and samsamson33 committed Feb 27, 2020
1 parent 2c26d49 commit f171f6d
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 @@ -357,8 +357,8 @@ class Message extends Base {
* @readonly
*/
get pinnable() {
return !this.guild ||
this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES, false);
return this.type === 'DEFAULT' && (!this.guild ||
this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES, false));
}

/**
Expand Down

0 comments on commit f171f6d

Please sign in to comment.