mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
fix(Message#pinnable): you can't pin system messages (#3279)
This commit is contained in:
@@ -345,8 +345,8 @@ class Message {
|
|||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
get pinnable() {
|
get pinnable() {
|
||||||
return !this.guild ||
|
return this.type === 'DEFAULT' && (!this.guild ||
|
||||||
this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES);
|
this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user