From 8c213e9088112e5aca4b5997dae38c1949b9a0d0 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 9348a1911..0d0147f0e 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -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)); } /**