mirror of
https://github.com/danbulant/discord.js
synced 2026-07-06 03:31:03 +00:00
Webpack build for branch master: 4e5556ba09
This commit is contained in:
parent
1b80e4e339
commit
55df670776
2 changed files with 28 additions and 25 deletions
|
|
@ -7523,32 +7523,35 @@ class TextBasedChannel {
|
||||||
this.messages.set(message.id, message);
|
this.messages.set(message.id, message);
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static applyToClass(structure, full = false, ignore = []) {
|
||||||
|
const props = ['send'];
|
||||||
|
if (full) {
|
||||||
|
props.push(
|
||||||
|
'_cacheMessage',
|
||||||
|
'acknowledge',
|
||||||
|
'fetchMessages',
|
||||||
|
'fetchMessage',
|
||||||
|
'search',
|
||||||
|
'bulkDelete',
|
||||||
|
'startTyping',
|
||||||
|
'stopTyping',
|
||||||
|
'typing',
|
||||||
|
'typingCount',
|
||||||
|
'fetchPinnedMessages',
|
||||||
|
'createMessageCollector',
|
||||||
|
'awaitMessages'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
for (const prop of props) {
|
||||||
|
if (ignore.includes(prop)) continue;
|
||||||
|
Object.defineProperty(structure.prototype, prop,
|
||||||
|
Object.getOwnPropertyDescriptor(TextBasedChannel.prototype, prop));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.applyToClass = (structure, full = false, ignore = []) => {
|
module.exports = TextBasedChannel;
|
||||||
const props = ['send'];
|
|
||||||
if (full) {
|
|
||||||
props.push(
|
|
||||||
'_cacheMessage',
|
|
||||||
'acknowledge',
|
|
||||||
'fetchMessages',
|
|
||||||
'fetchMessage',
|
|
||||||
'search',
|
|
||||||
'bulkDelete',
|
|
||||||
'startTyping',
|
|
||||||
'stopTyping',
|
|
||||||
'typing',
|
|
||||||
'typingCount',
|
|
||||||
'fetchPinnedMessages',
|
|
||||||
'createMessageCollector',
|
|
||||||
'awaitMessages'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
for (const prop of props) {
|
|
||||||
if (ignore.includes(prop)) continue;
|
|
||||||
Object.defineProperty(structure.prototype, prop, Object.getOwnPropertyDescriptor(TextBasedChannel.prototype, prop));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
|
||||||
2
discord.master.min.js
vendored
2
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue