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 06b72ee19f
commit 8c213e9088

View File

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