Skip to content

Commit

Permalink
fix: add property to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Syjalo committed Oct 28, 2022
1 parent ecaf12d commit aee0dc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/discord.js/src/structures/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -622,10 +622,10 @@ class Message extends Base {
get bulkDeletable() {
const permissions = this.channel?.permissionsFor(this.client.user);
return (
this.inGuild() &&
Date.now() - this.createdTimestamp < MaxBulkDeletableMessageAge &&
this.deletable &&
permissions?.has(PermissionFlagsBits.ManageMessages, false) ??
(this.inGuild() &&
Date.now() - this.createdTimestamp < MaxBulkDeletableMessageAge &&
this.deletable &&
permissions?.has(PermissionFlagsBits.ManageMessages, false)) ??
false
);
}
Expand Down
1 change: 1 addition & 0 deletions packages/discord.js/src/util/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ exports.VoiceBasedChannelTypes = [ChannelType.GuildVoice, ChannelType.GuildStage

/**
* @typedef {Object} Constants Constants that can be used in an enum or object-like way.
* @property {number} MaxBulkDeletableMessageAge Max bulk deletable message age
* @property {SweeperKey[]} SweeperKeys The possible names of items that can be swept in sweepers
* @property {NonSystemMessageTypes} NonSystemMessageTypes The types of messages that are not deemed a system type
* @property {TextBasedChannelTypes} TextBasedChannelTypes The types of channels that are text-based
Expand Down

0 comments on commit aee0dc9

Please sign in to comment.