From abebeac193f70e25c842cf4e51e12dd53e1096ca Mon Sep 17 00:00:00 2001 From: bdistin Date: Sat, 18 May 2019 12:02:23 -0500 Subject: [PATCH] fix(Message#pinnable): you can't pin system messages (#3279) --- src/structures/Message.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index c390ac231..8e5f423ab 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -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)); } /**