mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
Remove DMChannel.bulkDelete and GroupDMChannel.bulkDelete
This commit is contained in:
@@ -52,10 +52,10 @@ class DMChannel extends Channel {
|
|||||||
get typingCount() { return; }
|
get typingCount() { return; }
|
||||||
createCollector() { return; }
|
createCollector() { return; }
|
||||||
awaitMessages() { return; }
|
awaitMessages() { return; }
|
||||||
bulkDelete() { return; }
|
// doesn't work on DM channels; bulkDelete() { return; }
|
||||||
_cacheMessage() { return; }
|
_cacheMessage() { return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
TextBasedChannel.applyToClass(DMChannel, true);
|
TextBasedChannel.applyToClass(DMChannel, true, ['bulkDelete']);
|
||||||
|
|
||||||
module.exports = DMChannel;
|
module.exports = DMChannel;
|
||||||
|
|||||||
@@ -136,10 +136,10 @@ class GroupDMChannel extends Channel {
|
|||||||
get typingCount() { return; }
|
get typingCount() { return; }
|
||||||
createCollector() { return; }
|
createCollector() { return; }
|
||||||
awaitMessages() { return; }
|
awaitMessages() { return; }
|
||||||
bulkDelete() { return; }
|
// doesn't work on group DMs; bulkDelete() { return; }
|
||||||
_cacheMessage() { return; }
|
_cacheMessage() { return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
TextBasedChannel.applyToClass(GroupDMChannel, true);
|
TextBasedChannel.applyToClass(GroupDMChannel, true, ['bulkDelete']);
|
||||||
|
|
||||||
module.exports = GroupDMChannel;
|
module.exports = GroupDMChannel;
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ class TextBasedChannel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.applyToClass = (structure, full = false) => {
|
exports.applyToClass = (structure, full = false, ignore = []) => {
|
||||||
const props = ['send', 'sendMessage', 'sendEmbed', 'sendFile', 'sendCode'];
|
const props = ['send', 'sendMessage', 'sendEmbed', 'sendFile', 'sendCode'];
|
||||||
if (full) {
|
if (full) {
|
||||||
props.push(
|
props.push(
|
||||||
@@ -391,6 +391,7 @@ exports.applyToClass = (structure, full = false) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
for (const prop of props) {
|
for (const prop of props) {
|
||||||
|
if (ignore.includes(prop)) continue;
|
||||||
Object.defineProperty(structure.prototype, prop, Object.getOwnPropertyDescriptor(TextBasedChannel.prototype, prop));
|
Object.defineProperty(structure.prototype, prop, Object.getOwnPropertyDescriptor(TextBasedChannel.prototype, prop));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user