mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-20 21:43:33 +01:00
important build stuff (#1663)
This commit is contained in:
@@ -18,7 +18,7 @@ module.exports = {
|
||||
SnowflakeUtil: require('./util/Snowflake'),
|
||||
Util: Util,
|
||||
util: Util,
|
||||
version: require('../package').version,
|
||||
version: require('../package.json').version,
|
||||
|
||||
// Shortcuts to Util methods
|
||||
escapeMarkdown: Util.escapeMarkdown,
|
||||
|
||||
@@ -383,9 +383,8 @@ class TextBasedChannel {
|
||||
this.messages.set(message.id, message);
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
||||
exports.applyToClass = (structure, full = false, ignore = []) => {
|
||||
static applyToClass(structure, full = false, ignore = []) {
|
||||
const props = ['send'];
|
||||
if (full) {
|
||||
props.push(
|
||||
@@ -406,6 +405,10 @@ exports.applyToClass = (structure, full = false, ignore = []) => {
|
||||
}
|
||||
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));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = TextBasedChannel;
|
||||
|
||||
Reference in New Issue
Block a user