Skip to content

Commit

Permalink
fix(Message#pinnable): you can't pin system messages (#3279)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdistin authored and SpaceEEC committed May 18, 2019
1 parent 06b72ee commit 8c213e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/structures/Message.js
Expand Up @@ -345,8 +345,8 @@ class Message {
* @readonly
*/
get pinnable() {
return !this.guild ||
this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES);
return this.type === 'DEFAULT' && (!this.guild ||
this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES));
}

/**
Expand Down

0 comments on commit 8c213e9

Please sign in to comment.