fix(Message#pinnable): you can't pin system messages (#3279)

This commit is contained in:
bdistin
2019-05-18 12:02:23 -05:00
committed by SpaceEEC
parent 3ad16fa351
commit abebeac193

View File

@@ -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));
}
/**