mirror of
https://github.com/danbulant/discord.js
synced 2026-07-05 19:20:42 +00:00
Webpack build for branch 11.1-dev: 8a7a805d92
This commit is contained in:
parent
a31ebae536
commit
d335b09872
2 changed files with 1102 additions and 1076 deletions
|
|
@ -667,7 +667,7 @@ exports.Colors = {
|
||||||
NOT_QUITE_BLACK: 0x23272A,
|
NOT_QUITE_BLACK: 0x23272A,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)))
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
|
|
@ -1111,7 +1111,7 @@ module.exports = Collection;
|
||||||
/* 4 */
|
/* 4 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
/* WEBPACK VAR INJECTION */(function(Buffer) {const snekfetch = __webpack_require__(39);
|
/* WEBPACK VAR INJECTION */(function(Buffer) {const snekfetch = __webpack_require__(38);
|
||||||
const Constants = __webpack_require__(0);
|
const Constants = __webpack_require__(0);
|
||||||
const ConstantsHttp = Constants.DefaultOptions.http;
|
const ConstantsHttp = Constants.DefaultOptions.http;
|
||||||
|
|
||||||
|
|
@ -3125,6 +3125,87 @@ function isnan (val) {
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 6 */
|
/* 6 */
|
||||||
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
const Long = __webpack_require__(34);
|
||||||
|
|
||||||
|
// Discord epoch (2015-01-01T00:00:00.000Z)
|
||||||
|
const EPOCH = 1420070400000;
|
||||||
|
let INCREMENT = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A container for useful snowflake-related methods.
|
||||||
|
*/
|
||||||
|
class SnowflakeUtil {
|
||||||
|
constructor() {
|
||||||
|
throw new Error(`The ${this.constructor.name} class may not be instantiated.`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A Twitter snowflake, except the epoch is 2015-01-01T00:00:00.000Z
|
||||||
|
* ```
|
||||||
|
* If we have a snowflake '266241948824764416' we can represent it as binary:
|
||||||
|
*
|
||||||
|
* 64 22 17 12 0
|
||||||
|
* 000000111011000111100001101001000101000000 00001 00000 000000000000
|
||||||
|
* number of ms since Discord epoch worker pid increment
|
||||||
|
* ```
|
||||||
|
* @typedef {string} Snowflake
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates a Discord snowflake.
|
||||||
|
* <info>This hardcodes the worker ID as 1 and the process ID as 0.</info>
|
||||||
|
* @returns {Snowflake} The generated snowflake
|
||||||
|
*/
|
||||||
|
static generate() {
|
||||||
|
if (INCREMENT >= 4095) INCREMENT = 0;
|
||||||
|
const BINARY = `${pad((Date.now() - EPOCH).toString(2), 42)}0000100000${pad((INCREMENT++).toString(2), 12)}`;
|
||||||
|
return Long.fromString(BINARY, 2).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A deconstructed snowflake.
|
||||||
|
* @typedef {Object} DeconstructedSnowflake
|
||||||
|
* @property {number} timestamp Timestamp the snowflake was created
|
||||||
|
* @property {Date} date Date the snowflake was created
|
||||||
|
* @property {number} workerID Worker ID in the snowflake
|
||||||
|
* @property {number} processID Process ID in the snowflake
|
||||||
|
* @property {number} increment Increment in the snowflake
|
||||||
|
* @property {string} binary Binary representation of the snowflake
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deconstructs a Discord snowflake.
|
||||||
|
* @param {Snowflake} snowflake Snowflake to deconstruct
|
||||||
|
* @returns {DeconstructedSnowflake} Deconstructed snowflake
|
||||||
|
*/
|
||||||
|
static deconstruct(snowflake) {
|
||||||
|
const BINARY = pad(Long.fromString(snowflake).toString(2), 64);
|
||||||
|
const res = {
|
||||||
|
timestamp: parseInt(BINARY.substring(0, 42), 2) + EPOCH,
|
||||||
|
workerID: parseInt(BINARY.substring(42, 47), 2),
|
||||||
|
processID: parseInt(BINARY.substring(47, 52), 2),
|
||||||
|
increment: parseInt(BINARY.substring(52, 64), 2),
|
||||||
|
binary: BINARY,
|
||||||
|
};
|
||||||
|
Object.defineProperty(res, 'date', {
|
||||||
|
get: function get() { return new Date(this.timestamp); },
|
||||||
|
enumerable: true,
|
||||||
|
});
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function pad(v, n, c = '0') {
|
||||||
|
return String(v).length >= n ? String(v) : (String(c).repeat(n) + v).slice(-n);
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = SnowflakeUtil;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
/* 7 */
|
||||||
/***/ (function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
// shim for using process in browser
|
// shim for using process in browser
|
||||||
|
|
@ -3297,6 +3378,10 @@ process.off = noop;
|
||||||
process.removeListener = noop;
|
process.removeListener = noop;
|
||||||
process.removeAllListeners = noop;
|
process.removeAllListeners = noop;
|
||||||
process.emit = noop;
|
process.emit = noop;
|
||||||
|
process.prependListener = noop;
|
||||||
|
process.prependOnceListener = noop;
|
||||||
|
|
||||||
|
process.listeners = function (name) { return [] }
|
||||||
|
|
||||||
process.binding = function (name) {
|
process.binding = function (name) {
|
||||||
throw new Error('process.binding is not supported');
|
throw new Error('process.binding is not supported');
|
||||||
|
|
@ -3309,87 +3394,6 @@ process.chdir = function (dir) {
|
||||||
process.umask = function() { return 0; };
|
process.umask = function() { return 0; };
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 7 */
|
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
|
||||||
|
|
||||||
const Long = __webpack_require__(35);
|
|
||||||
|
|
||||||
// Discord epoch (2015-01-01T00:00:00.000Z)
|
|
||||||
const EPOCH = 1420070400000;
|
|
||||||
let INCREMENT = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A container for useful snowflake-related methods.
|
|
||||||
*/
|
|
||||||
class SnowflakeUtil {
|
|
||||||
constructor() {
|
|
||||||
throw new Error(`The ${this.constructor.name} class may not be instantiated.`);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A Twitter snowflake, except the epoch is 2015-01-01T00:00:00.000Z
|
|
||||||
* ```
|
|
||||||
* If we have a snowflake '266241948824764416' we can represent it as binary:
|
|
||||||
*
|
|
||||||
* 64 22 17 12 0
|
|
||||||
* 000000111011000111100001101001000101000000 00001 00000 000000000000
|
|
||||||
* number of ms since Discord epoch worker pid increment
|
|
||||||
* ```
|
|
||||||
* @typedef {string} Snowflake
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generates a Discord snowflake.
|
|
||||||
* <info>This hardcodes the worker ID as 1 and the process ID as 0.</info>
|
|
||||||
* @returns {Snowflake} The generated snowflake
|
|
||||||
*/
|
|
||||||
static generate() {
|
|
||||||
if (INCREMENT >= 4095) INCREMENT = 0;
|
|
||||||
const BINARY = `${pad((Date.now() - EPOCH).toString(2), 42)}0000100000${pad((INCREMENT++).toString(2), 12)}`;
|
|
||||||
return Long.fromString(BINARY, 2).toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A deconstructed snowflake.
|
|
||||||
* @typedef {Object} DeconstructedSnowflake
|
|
||||||
* @property {number} timestamp Timestamp the snowflake was created
|
|
||||||
* @property {Date} date Date the snowflake was created
|
|
||||||
* @property {number} workerID Worker ID in the snowflake
|
|
||||||
* @property {number} processID Process ID in the snowflake
|
|
||||||
* @property {number} increment Increment in the snowflake
|
|
||||||
* @property {string} binary Binary representation of the snowflake
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Deconstructs a Discord snowflake.
|
|
||||||
* @param {Snowflake} snowflake Snowflake to deconstruct
|
|
||||||
* @returns {DeconstructedSnowflake} Deconstructed snowflake
|
|
||||||
*/
|
|
||||||
static deconstruct(snowflake) {
|
|
||||||
const BINARY = pad(Long.fromString(snowflake).toString(2), 64);
|
|
||||||
const res = {
|
|
||||||
timestamp: parseInt(BINARY.substring(0, 42), 2) + EPOCH,
|
|
||||||
workerID: parseInt(BINARY.substring(42, 47), 2),
|
|
||||||
processID: parseInt(BINARY.substring(47, 52), 2),
|
|
||||||
increment: parseInt(BINARY.substring(52, 64), 2),
|
|
||||||
binary: BINARY,
|
|
||||||
};
|
|
||||||
Object.defineProperty(res, 'date', {
|
|
||||||
get: function get() { return new Date(this.timestamp); },
|
|
||||||
enumerable: true,
|
|
||||||
});
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function pad(v, n, c = '0') {
|
|
||||||
return String(v).length >= n ? String(v) : (String(c).repeat(n) + v).slice(-n);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = SnowflakeUtil;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 8 */
|
/* 8 */
|
||||||
/***/ (function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
@ -4158,7 +4162,7 @@ var objectKeys = Object.keys || function (obj) {
|
||||||
module.exports = Duplex;
|
module.exports = Duplex;
|
||||||
|
|
||||||
/*<replacement>*/
|
/*<replacement>*/
|
||||||
var processNextTick = __webpack_require__(36);
|
var processNextTick = __webpack_require__(35);
|
||||||
/*</replacement>*/
|
/*</replacement>*/
|
||||||
|
|
||||||
/*<replacement>*/
|
/*<replacement>*/
|
||||||
|
|
@ -4167,7 +4171,7 @@ util.inherits = __webpack_require__(10);
|
||||||
/*</replacement>*/
|
/*</replacement>*/
|
||||||
|
|
||||||
var Readable = __webpack_require__(59);
|
var Readable = __webpack_require__(59);
|
||||||
var Writable = __webpack_require__(38);
|
var Writable = __webpack_require__(37);
|
||||||
|
|
||||||
util.inherits(Duplex, Readable);
|
util.inherits(Duplex, Readable);
|
||||||
|
|
||||||
|
|
@ -4218,7 +4222,7 @@ function forEach(xs, f) {
|
||||||
/* 14 */
|
/* 14 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
const Snowflake = __webpack_require__(7);
|
const Snowflake = __webpack_require__(6);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents any channel on Discord.
|
* Represents any channel on Discord.
|
||||||
|
|
@ -4293,7 +4297,7 @@ module.exports = Channel;
|
||||||
/* 15 */
|
/* 15 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
const Snowflake = __webpack_require__(7);
|
const Snowflake = __webpack_require__(6);
|
||||||
const Permissions = __webpack_require__(9);
|
const Permissions = __webpack_require__(9);
|
||||||
const util = __webpack_require__(22);
|
const util = __webpack_require__(22);
|
||||||
|
|
||||||
|
|
@ -4660,7 +4664,7 @@ module.exports = Role;
|
||||||
const TextBasedChannel = __webpack_require__(23);
|
const TextBasedChannel = __webpack_require__(23);
|
||||||
const Constants = __webpack_require__(0);
|
const Constants = __webpack_require__(0);
|
||||||
const Presence = __webpack_require__(11).Presence;
|
const Presence = __webpack_require__(11).Presence;
|
||||||
const Snowflake = __webpack_require__(7);
|
const Snowflake = __webpack_require__(6);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a user on Discord.
|
* Represents a user on Discord.
|
||||||
|
|
@ -4968,7 +4972,7 @@ module.exports = User;
|
||||||
|
|
||||||
const Constants = __webpack_require__(0);
|
const Constants = __webpack_require__(0);
|
||||||
const Collection = __webpack_require__(3);
|
const Collection = __webpack_require__(3);
|
||||||
const Snowflake = __webpack_require__(7);
|
const Snowflake = __webpack_require__(6);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a custom emoji.
|
* Represents a custom emoji.
|
||||||
|
|
@ -5581,7 +5585,7 @@ class GuildMember {
|
||||||
*/
|
*/
|
||||||
addRole(role) {
|
addRole(role) {
|
||||||
if (!(role instanceof Role)) role = this.guild.roles.get(role);
|
if (!(role instanceof Role)) role = this.guild.roles.get(role);
|
||||||
if (!role) throw new TypeError('Supplied parameter was neither a Role nor a Snowflake.');
|
if (!role) return Promise.reject(new TypeError('Supplied parameter was neither a Role nor a Snowflake.'));
|
||||||
return this.client.rest.methods.addMemberRole(this, role);
|
return this.client.rest.methods.addMemberRole(this, role);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5608,7 +5612,7 @@ class GuildMember {
|
||||||
*/
|
*/
|
||||||
removeRole(role) {
|
removeRole(role) {
|
||||||
if (!(role instanceof Role)) role = this.guild.roles.get(role);
|
if (!(role instanceof Role)) role = this.guild.roles.get(role);
|
||||||
if (!role) throw new TypeError('Supplied parameter was neither a Role nor a Snowflake.');
|
if (!role) return Promise.reject(new TypeError('Supplied parameter was neither a Role nor a Snowflake.'));
|
||||||
return this.client.rest.methods.removeMemberRole(this, role);
|
return this.client.rest.methods.removeMemberRole(this, role);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -6408,7 +6412,7 @@ function objectToString(o) {
|
||||||
exports = module.exports = __webpack_require__(59);
|
exports = module.exports = __webpack_require__(59);
|
||||||
exports.Stream = exports;
|
exports.Stream = exports;
|
||||||
exports.Readable = exports;
|
exports.Readable = exports;
|
||||||
exports.Writable = __webpack_require__(38);
|
exports.Writable = __webpack_require__(37);
|
||||||
exports.Duplex = __webpack_require__(13);
|
exports.Duplex = __webpack_require__(13);
|
||||||
exports.Transform = __webpack_require__(60);
|
exports.Transform = __webpack_require__(60);
|
||||||
exports.PassThrough = __webpack_require__(85);
|
exports.PassThrough = __webpack_require__(85);
|
||||||
|
|
@ -7005,7 +7009,7 @@ function hasOwnProperty(obj, prop) {
|
||||||
return Object.prototype.hasOwnProperty.call(obj, prop);
|
return Object.prototype.hasOwnProperty.call(obj, prop);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8), __webpack_require__(6)))
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8), __webpack_require__(7)))
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 23 */
|
/* 23 */
|
||||||
|
|
@ -7571,7 +7575,7 @@ exports.EOL = '\n';
|
||||||
/* 25 */
|
/* 25 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
const Long = __webpack_require__(35);
|
const Long = __webpack_require__(34);
|
||||||
const User = __webpack_require__(16);
|
const User = __webpack_require__(16);
|
||||||
const Role = __webpack_require__(15);
|
const Role = __webpack_require__(15);
|
||||||
const Emoji = __webpack_require__(17);
|
const Emoji = __webpack_require__(17);
|
||||||
|
|
@ -7580,7 +7584,7 @@ const GuildMember = __webpack_require__(18);
|
||||||
const Constants = __webpack_require__(0);
|
const Constants = __webpack_require__(0);
|
||||||
const Collection = __webpack_require__(3);
|
const Collection = __webpack_require__(3);
|
||||||
const Util = __webpack_require__(4);
|
const Util = __webpack_require__(4);
|
||||||
const Snowflake = __webpack_require__(7);
|
const Snowflake = __webpack_require__(6);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a guild (or a server) on Discord.
|
* Represents a guild (or a server) on Discord.
|
||||||
|
|
@ -8995,7 +8999,7 @@ module.exports = GuildChannel;
|
||||||
/* 27 */
|
/* 27 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
const Snowflake = __webpack_require__(7);
|
const Snowflake = __webpack_require__(6);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents an OAuth2 Application.
|
* Represents an OAuth2 Application.
|
||||||
|
|
@ -9368,16 +9372,10 @@ var substr = 'ab'.substr(-1) === 'b'
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)))
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 29 */
|
/* 29 */
|
||||||
/***/ (function(module, exports) {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
/* 30 */
|
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
const Channel = __webpack_require__(14);
|
const Channel = __webpack_require__(14);
|
||||||
|
|
@ -9563,7 +9561,7 @@ module.exports = GroupDMChannel;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 31 */
|
/* 30 */
|
||||||
/***/ (function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -9618,7 +9616,7 @@ module.exports = ReactionEmoji;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 32 */
|
/* 31 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
const path = __webpack_require__(28);
|
const path = __webpack_require__(28);
|
||||||
|
|
@ -9850,7 +9848,7 @@ module.exports = Webhook;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 33 */
|
/* 32 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
const Collection = __webpack_require__(3);
|
const Collection = __webpack_require__(3);
|
||||||
|
|
@ -10034,7 +10032,7 @@ module.exports = Collector;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 34 */
|
/* 33 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
@ -10150,7 +10148,7 @@ exports.allocUnsafeSlow = function allocUnsafeSlow(size) {
|
||||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 35 */
|
/* 34 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
||||||
|
|
@ -11368,7 +11366,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 36 */
|
/* 35 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
@ -11416,10 +11414,10 @@ function nextTick(fn, arg1, arg2, arg3) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)))
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 37 */
|
/* 36 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
@ -11430,7 +11428,7 @@ exports.encode = exports.stringify = __webpack_require__(83);
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 38 */
|
/* 37 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
@ -11443,7 +11441,7 @@ exports.encode = exports.stringify = __webpack_require__(83);
|
||||||
module.exports = Writable;
|
module.exports = Writable;
|
||||||
|
|
||||||
/*<replacement>*/
|
/*<replacement>*/
|
||||||
var processNextTick = __webpack_require__(36);
|
var processNextTick = __webpack_require__(35);
|
||||||
/*</replacement>*/
|
/*</replacement>*/
|
||||||
|
|
||||||
/*<replacement>*/
|
/*<replacement>*/
|
||||||
|
|
@ -11473,7 +11471,7 @@ var Stream = __webpack_require__(61);
|
||||||
|
|
||||||
var Buffer = __webpack_require__(5).Buffer;
|
var Buffer = __webpack_require__(5).Buffer;
|
||||||
/*<replacement>*/
|
/*<replacement>*/
|
||||||
var bufferShim = __webpack_require__(34);
|
var bufferShim = __webpack_require__(33);
|
||||||
/*</replacement>*/
|
/*</replacement>*/
|
||||||
|
|
||||||
util.inherits(Writable, Stream);
|
util.inherits(Writable, Stream);
|
||||||
|
|
@ -11978,82 +11976,87 @@ function CorkedRequest(state) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6), __webpack_require__(99).setImmediate))
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7), __webpack_require__(99).setImmediate))
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 39 */
|
/* 38 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
/* WEBPACK VAR INJECTION */(function(__dirname, Buffer, process) {const Snekfetch = __webpack_require__(93);
|
const Snekfetch = __webpack_require__(93);
|
||||||
|
|
||||||
const ENV_VAR = '__SNEKFETCH_SYNC_REQUEST';
|
// const ENV_VAR = '__SNEKFETCH_SYNC_REQUEST';
|
||||||
let first = true;
|
// let first = true;
|
||||||
|
//
|
||||||
for (let method of Snekfetch.METHODS) {
|
// for (let method of Snekfetch.METHODS) {
|
||||||
method = method === 'M-SEARCH' ? 'msearch' : method.toLowerCase();
|
// method = method === 'M-SEARCH' ? 'msearch' : method.toLowerCase();
|
||||||
Snekfetch[`${method}Sync`] = (url, options = {}) => {
|
// Snekfetch[`${method}Sync`] = (url, options = {}) => {
|
||||||
if (first) {
|
// if (first) {
|
||||||
first = false;
|
// first = false;
|
||||||
console.error(
|
// console.error(
|
||||||
'Performing sync requests is a really stupid thing to do. ' +
|
// 'Performing sync requests is a really stupid thing to do. ' +
|
||||||
'https://www.google.com/search?q=why+sync+requests+are+bad+nodejs'
|
// 'https://www.google.com/search?q=why+sync+requests+are+bad+nodejs'
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
options.url = url;
|
// options.url = url;
|
||||||
options.method = method;
|
// options.method = method;
|
||||||
const cp = __webpack_require__(29);
|
// const cp = require('child_process');
|
||||||
const result = JSON.parse(
|
// const result = JSON.parse(
|
||||||
cp.execSync(`node ${__dirname}/index.js`, {
|
// cp.execSync(`node ${__dirname}/index.js`, {
|
||||||
env: { [ENV_VAR]: JSON.stringify(options) },
|
// env: { [ENV_VAR]: JSON.stringify(options) },
|
||||||
}).toString(),
|
// }).toString(),
|
||||||
(k, v) => {
|
// (k, v) => {
|
||||||
if (v === null) return v;
|
// if (v === null) return v;
|
||||||
if (v.type === 'Buffer' && Array.isArray(v.data)) return new Buffer(v.data);
|
// if (v.type === 'Buffer' && Array.isArray(v.data)) return new Buffer(v.data);
|
||||||
if (v.__CONVERT_TO_ERROR) {
|
// if (v.__CONVERT_TO_ERROR) {
|
||||||
const e = new Error();
|
// const e = new Error();
|
||||||
for (const key of Object.keys(v)) {
|
// for (const key of Object.keys(v)) {
|
||||||
if (key === '__CONVERT_TO_ERROR') continue;
|
// if (key === '__CONVERT_TO_ERROR') continue;
|
||||||
e[key] = v[key];
|
// e[key] = v[key];
|
||||||
}
|
// }
|
||||||
return e;
|
// return e;
|
||||||
}
|
// }
|
||||||
return v;
|
// return v;
|
||||||
}
|
// }
|
||||||
);
|
// );
|
||||||
if (result.error) throw result.error;
|
// if (result.error) throw result.error;
|
||||||
return result;
|
// return result;
|
||||||
};
|
// };
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (process.env[ENV_VAR]) {
|
// if (process.env[ENV_VAR]) {
|
||||||
const options = JSON.parse(process.env[ENV_VAR]);
|
// const options = JSON.parse(process.env[ENV_VAR]);
|
||||||
const request = Snekfetch[options.method](options.url);
|
// const request = Snekfetch[options.method](options.url);
|
||||||
if (options.headers) request.set(options.headers);
|
// if (options.headers) request.set(options.headers);
|
||||||
if (options.body) request.send(options.body);
|
// if (options.body) request.send(options.body);
|
||||||
request.end((err, res = {}) => {
|
// request.end((err, res = {}) => {
|
||||||
if (err) {
|
// if (err) {
|
||||||
const alt = {};
|
// const alt = {};
|
||||||
for (const name of Object.getOwnPropertyNames(err)) alt[name] = err[name];
|
// for (const name of Object.getOwnPropertyNames(err)) alt[name] = err[name];
|
||||||
res.error = alt;
|
// res.error = alt;
|
||||||
res.error.__CONVERT_TO_ERROR = true;
|
// res.error.__CONVERT_TO_ERROR = true;
|
||||||
}
|
// }
|
||||||
// circulars
|
// // circulars
|
||||||
res.request = null;
|
// res.request = null;
|
||||||
process.stdout.write(JSON.stringify(res));
|
// process.stdout.write(JSON.stringify(res));
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
module.exports = Snekfetch;
|
module.exports = Snekfetch;
|
||||||
|
|
||||||
/* WEBPACK VAR INJECTION */}.call(exports, "node_modules/snekfetch", __webpack_require__(5).Buffer, __webpack_require__(6)))
|
|
||||||
|
/***/ }),
|
||||||
|
/* 39 */
|
||||||
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 40 */
|
/* 40 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
/* WEBPACK VAR INJECTION */(function(Buffer) {const path = __webpack_require__(28);
|
/* WEBPACK VAR INJECTION */(function(Buffer) {const path = __webpack_require__(28);
|
||||||
const fs = __webpack_require__(29);
|
const fs = __webpack_require__(39);
|
||||||
const snekfetch = __webpack_require__(39);
|
const snekfetch = __webpack_require__(38);
|
||||||
|
|
||||||
const Constants = __webpack_require__(0);
|
const Constants = __webpack_require__(0);
|
||||||
const convertToBuffer = __webpack_require__(4).convertToBuffer;
|
const convertToBuffer = __webpack_require__(4).convertToBuffer;
|
||||||
|
|
@ -12063,7 +12066,7 @@ const Guild = __webpack_require__(25);
|
||||||
const Channel = __webpack_require__(14);
|
const Channel = __webpack_require__(14);
|
||||||
const GuildMember = __webpack_require__(18);
|
const GuildMember = __webpack_require__(18);
|
||||||
const Emoji = __webpack_require__(17);
|
const Emoji = __webpack_require__(17);
|
||||||
const ReactionEmoji = __webpack_require__(31);
|
const ReactionEmoji = __webpack_require__(30);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.
|
* The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.
|
||||||
|
|
@ -12440,7 +12443,8 @@ module.exports = {
|
||||||
"discord.js-docgen": "hydrabolt/discord.js-docgen",
|
"discord.js-docgen": "hydrabolt/discord.js-docgen",
|
||||||
"eslint": "^3.19.0",
|
"eslint": "^3.19.0",
|
||||||
"parallel-webpack": "^1.6.0",
|
"parallel-webpack": "^1.6.0",
|
||||||
"uglify-js": "mishoo/UglifyJS2#harmony",
|
"uglify-js": "mishoo/UglifyJS2#harmony-v2.8.22",
|
||||||
|
"uglifyjs-webpack-plugin": "^0.4.3",
|
||||||
"webpack": "^2.2.0"
|
"webpack": "^2.2.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
@ -12991,7 +12995,7 @@ module.exports = DMChannel;
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
const Collection = __webpack_require__(3);
|
const Collection = __webpack_require__(3);
|
||||||
const Snowflake = __webpack_require__(7);
|
const Snowflake = __webpack_require__(6);
|
||||||
|
|
||||||
const Targets = {
|
const Targets = {
|
||||||
GUILD: 'GUILD',
|
GUILD: 'GUILD',
|
||||||
|
|
@ -13518,7 +13522,7 @@ module.exports = MessageAttachment;
|
||||||
/* 48 */
|
/* 48 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
const Collector = __webpack_require__(33);
|
const Collector = __webpack_require__(32);
|
||||||
const util = __webpack_require__(22);
|
const util = __webpack_require__(22);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -14139,7 +14143,7 @@ class MessageMentions {
|
||||||
MessageMentions.EVERYONE_PATTERN = /@(everyone|here)/g;
|
MessageMentions.EVERYONE_PATTERN = /@(everyone|here)/g;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Regular expression that globally matches user mentions like `<#81440962496172032>`
|
* Regular expression that globally matches user mentions like `<@81440962496172032>`
|
||||||
* @type {RegExp}
|
* @type {RegExp}
|
||||||
*/
|
*/
|
||||||
MessageMentions.USERS_PATTERN = /<@!?[0-9]+>/g;
|
MessageMentions.USERS_PATTERN = /<@!?[0-9]+>/g;
|
||||||
|
|
@ -14165,7 +14169,7 @@ module.exports = MessageMentions;
|
||||||
|
|
||||||
const Collection = __webpack_require__(3);
|
const Collection = __webpack_require__(3);
|
||||||
const Emoji = __webpack_require__(17);
|
const Emoji = __webpack_require__(17);
|
||||||
const ReactionEmoji = __webpack_require__(31);
|
const ReactionEmoji = __webpack_require__(30);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a reaction to a message.
|
* Represents a reaction to a message.
|
||||||
|
|
@ -14418,7 +14422,7 @@ module.exports = PermissionOverwrites;
|
||||||
/* 55 */
|
/* 55 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
const Collector = __webpack_require__(33);
|
const Collector = __webpack_require__(32);
|
||||||
const Collection = __webpack_require__(3);
|
const Collection = __webpack_require__(3);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -14780,7 +14784,7 @@ module.exports = Array.isArray || function (arr) {
|
||||||
module.exports = Readable;
|
module.exports = Readable;
|
||||||
|
|
||||||
/*<replacement>*/
|
/*<replacement>*/
|
||||||
var processNextTick = __webpack_require__(36);
|
var processNextTick = __webpack_require__(35);
|
||||||
/*</replacement>*/
|
/*</replacement>*/
|
||||||
|
|
||||||
/*<replacement>*/
|
/*<replacement>*/
|
||||||
|
|
@ -14807,7 +14811,7 @@ var Stream = __webpack_require__(61);
|
||||||
|
|
||||||
var Buffer = __webpack_require__(5).Buffer;
|
var Buffer = __webpack_require__(5).Buffer;
|
||||||
/*<replacement>*/
|
/*<replacement>*/
|
||||||
var bufferShim = __webpack_require__(34);
|
var bufferShim = __webpack_require__(33);
|
||||||
/*</replacement>*/
|
/*</replacement>*/
|
||||||
|
|
||||||
/*<replacement>*/
|
/*<replacement>*/
|
||||||
|
|
@ -15710,7 +15714,7 @@ function indexOf(xs, x) {
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)))
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 60 */
|
/* 60 */
|
||||||
|
|
@ -16305,7 +16309,7 @@ var protocolPattern = /^([a-z0-9.+-]+:)/i,
|
||||||
'gopher:': true,
|
'gopher:': true,
|
||||||
'file:': true
|
'file:': true
|
||||||
},
|
},
|
||||||
querystring = __webpack_require__(37);
|
querystring = __webpack_require__(36);
|
||||||
|
|
||||||
function urlParse(url, parseQueryString, slashesDenoteHost) {
|
function urlParse(url, parseQueryString, slashesDenoteHost) {
|
||||||
if (url && util.isObject(url) && url instanceof Url) return url;
|
if (url && util.isObject(url) && url instanceof Url) return url;
|
||||||
|
|
@ -17343,7 +17347,7 @@ module.exports = RequestHandler;
|
||||||
/* WEBPACK VAR INJECTION */(function(Buffer) {const browser = __webpack_require__(24).platform() === 'browser';
|
/* WEBPACK VAR INJECTION */(function(Buffer) {const browser = __webpack_require__(24).platform() === 'browser';
|
||||||
const EventEmitter = __webpack_require__(12);
|
const EventEmitter = __webpack_require__(12);
|
||||||
const Constants = __webpack_require__(0);
|
const Constants = __webpack_require__(0);
|
||||||
const zlib = __webpack_require__(29);
|
const zlib = __webpack_require__(39);
|
||||||
const PacketManager = __webpack_require__(144);
|
const PacketManager = __webpack_require__(144);
|
||||||
const erlpack = (function findErlpack() {
|
const erlpack = (function findErlpack() {
|
||||||
try {
|
try {
|
||||||
|
|
@ -18394,13 +18398,13 @@ module.exports = Client;
|
||||||
* @param {string} info The debug information
|
* @param {string} info The debug information
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)))
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 72 */
|
/* 72 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
const Webhook = __webpack_require__(32);
|
const Webhook = __webpack_require__(31);
|
||||||
const RESTManager = __webpack_require__(68);
|
const RESTManager = __webpack_require__(68);
|
||||||
const ClientDataResolver = __webpack_require__(40);
|
const ClientDataResolver = __webpack_require__(40);
|
||||||
const Constants = __webpack_require__(0);
|
const Constants = __webpack_require__(0);
|
||||||
|
|
@ -19837,7 +19841,7 @@ PassThrough.prototype._transform = function (chunk, encoding, cb) {
|
||||||
|
|
||||||
var Buffer = __webpack_require__(5).Buffer;
|
var Buffer = __webpack_require__(5).Buffer;
|
||||||
/*<replacement>*/
|
/*<replacement>*/
|
||||||
var bufferShim = __webpack_require__(34);
|
var bufferShim = __webpack_require__(33);
|
||||||
/*</replacement>*/
|
/*</replacement>*/
|
||||||
|
|
||||||
module.exports = BufferList;
|
module.exports = BufferList;
|
||||||
|
|
@ -19916,7 +19920,7 @@ module.exports = __webpack_require__(21).Transform
|
||||||
/* 89 */
|
/* 89 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
module.exports = __webpack_require__(38);
|
module.exports = __webpack_require__(37);
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
@ -20110,7 +20114,7 @@ module.exports = __webpack_require__(38);
|
||||||
attachTo.clearImmediate = clearImmediate;
|
attachTo.clearImmediate = clearImmediate;
|
||||||
}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
|
}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
|
||||||
|
|
||||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8), __webpack_require__(6)))
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8), __webpack_require__(7)))
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 91 */
|
/* 91 */
|
||||||
|
|
@ -20132,19 +20136,19 @@ module.exports = {
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "snekfetch@>=3.1.0 <4.0.0",
|
"_from": "snekfetch@>=3.1.0 <4.0.0",
|
||||||
"_id": "snekfetch@3.1.2",
|
"_id": "snekfetch@3.1.6",
|
||||||
"_inCache": true,
|
"_inCache": true,
|
||||||
"_location": "/snekfetch",
|
"_location": "/snekfetch",
|
||||||
"_nodeVersion": "7.9.0",
|
"_nodeVersion": "7.9.0",
|
||||||
"_npmOperationalInternal": {
|
"_npmOperationalInternal": {
|
||||||
"host": "packages-18-east.internal.npmjs.com",
|
"host": "packages-12-west.internal.npmjs.com",
|
||||||
"tmp": "tmp/snekfetch-3.1.2.tgz_1492882967312_0.8088863184675574"
|
"tmp": "tmp/snekfetch-3.1.6.tgz_1493569353717_0.8596337598282844"
|
||||||
},
|
},
|
||||||
"_npmUser": {
|
"_npmUser": {
|
||||||
"name": "crawl",
|
"name": "snek",
|
||||||
"email": "icrawltogo@gmail.com"
|
"email": "me@gus.host"
|
||||||
},
|
},
|
||||||
"_npmVersion": "4.2.0",
|
"_npmVersion": "4.5.0",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
"raw": "snekfetch@^3.1.0",
|
"raw": "snekfetch@^3.1.0",
|
||||||
|
|
@ -20158,8 +20162,8 @@ module.exports = {
|
||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/"
|
"/"
|
||||||
],
|
],
|
||||||
"_resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.1.2.tgz",
|
"_resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.1.6.tgz",
|
||||||
"_shasum": "3422a9191c1bb6610867db88e669db0b5adb7f42",
|
"_shasum": "3090d5cd3f5bc1e456f8aafa5024f64b7ca5b1e0",
|
||||||
"_shrinkwrap": null,
|
"_shrinkwrap": null,
|
||||||
"_spec": "snekfetch@^3.1.0",
|
"_spec": "snekfetch@^3.1.0",
|
||||||
"_where": "/home/travis/build/hydrabolt/discord.js",
|
"_where": "/home/travis/build/hydrabolt/discord.js",
|
||||||
|
|
@ -20175,10 +20179,10 @@ module.exports = {
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"directories": {},
|
"directories": {},
|
||||||
"dist": {
|
"dist": {
|
||||||
"shasum": "3422a9191c1bb6610867db88e669db0b5adb7f42",
|
"shasum": "3090d5cd3f5bc1e456f8aafa5024f64b7ca5b1e0",
|
||||||
"tarball": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.1.2.tgz"
|
"tarball": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.1.6.tgz"
|
||||||
},
|
},
|
||||||
"gitHead": "a79f6867d21ca58ffe6fc59eb77b06f257f8ad29",
|
"gitHead": "b03a6bb7d3b73ac3a4b27c7cfffcfbaa87d38700",
|
||||||
"homepage": "https://github.com/GusCaplan/snekfetch#readme",
|
"homepage": "https://github.com/GusCaplan/snekfetch#readme",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
|
@ -20187,6 +20191,10 @@ module.exports = {
|
||||||
"name": "crawl",
|
"name": "crawl",
|
||||||
"email": "icrawltogo@gmail.com"
|
"email": "icrawltogo@gmail.com"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "hydrabolt",
|
||||||
|
"email": "amishshah.2k@gmail.com"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "snek",
|
"name": "snek",
|
||||||
"email": "me@gus.host"
|
"email": "me@gus.host"
|
||||||
|
|
@ -20200,7 +20208,7 @@ module.exports = {
|
||||||
"url": "git+https://github.com/GusCaplan/snekfetch.git"
|
"url": "git+https://github.com/GusCaplan/snekfetch.git"
|
||||||
},
|
},
|
||||||
"scripts": {},
|
"scripts": {},
|
||||||
"version": "3.1.2"
|
"version": "3.1.6"
|
||||||
};
|
};
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
@ -20223,7 +20231,7 @@ class FormData {
|
||||||
if (filename) {
|
if (filename) {
|
||||||
str += `; filename="${filename}"`;
|
str += `; filename="${filename}"`;
|
||||||
mimetype = 'application/octet-stream';
|
mimetype = 'application/octet-stream';
|
||||||
const extname = path.extname(filename);
|
const extname = path.extname(filename).slice(1);
|
||||||
if (extname) mimetype = mime.lookup(extname);
|
if (extname) mimetype = mime.lookup(extname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -20262,8 +20270,8 @@ module.exports = FormData;
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
/* WEBPACK VAR INJECTION */(function(Buffer) {__webpack_require__(62);
|
/* WEBPACK VAR INJECTION */(function(Buffer) {__webpack_require__(62);
|
||||||
const zlib = __webpack_require__(29);
|
const zlib = __webpack_require__(39);
|
||||||
const qs = __webpack_require__(37);
|
const qs = __webpack_require__(36);
|
||||||
const http = __webpack_require__(63);
|
const http = __webpack_require__(63);
|
||||||
const https = __webpack_require__(79);
|
const https = __webpack_require__(79);
|
||||||
const URL = __webpack_require__(65);
|
const URL = __webpack_require__(65);
|
||||||
|
|
@ -20316,7 +20324,7 @@ class Snekfetch extends Stream.Readable {
|
||||||
send(data) {
|
send(data) {
|
||||||
if (this.request.res) throw new Error('Cannot modify data after being sent!');
|
if (this.request.res) throw new Error('Cannot modify data after being sent!');
|
||||||
if (data !== null && typeof data === 'object') {
|
if (data !== null && typeof data === 'object') {
|
||||||
const header = this.request.getHeader('content-type');
|
const header = this._getHeader('content-type');
|
||||||
let serialize;
|
let serialize;
|
||||||
if (header) {
|
if (header) {
|
||||||
if (header.includes('json')) serialize = JSON.stringify;
|
if (header.includes('json')) serialize = JSON.stringify;
|
||||||
|
|
@ -20447,7 +20455,7 @@ class Snekfetch extends Stream.Readable {
|
||||||
|
|
||||||
_read() {
|
_read() {
|
||||||
this.resume();
|
this.resume();
|
||||||
if (this.request.res) return;
|
if (this.response) return;
|
||||||
this.catch((err) => this.emit('error', err));
|
this.catch((err) => this.emit('error', err));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -20468,11 +20476,24 @@ class Snekfetch extends Stream.Readable {
|
||||||
|
|
||||||
_addFinalHeaders() {
|
_addFinalHeaders() {
|
||||||
if (!this.request) return;
|
if (!this.request) return;
|
||||||
if (!this.request.getHeader('user-agent')) {
|
if (!this._getHeader('user-agent')) {
|
||||||
this.set('User-Agent', `snekfetch/${Snekfetch.version} (${Package.repository.url.replace(/\.?git/, '')})`);
|
this.set('User-Agent', `snekfetch/${Snekfetch.version} (${Package.repository.url.replace(/\.?git/, '')})`);
|
||||||
}
|
}
|
||||||
if (this.request.method !== 'HEAD') this.set('Accept-Encoding', 'gzip, deflate');
|
if (this.request.method !== 'HEAD') this.set('Accept-Encoding', 'gzip, deflate');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get response() {
|
||||||
|
return this.request.res || this.request._response || null;
|
||||||
|
}
|
||||||
|
|
||||||
|
_getHeader(header) {
|
||||||
|
// https://github.com/jhiesey/stream-http/pull/77
|
||||||
|
try {
|
||||||
|
return this.request.getHeader(header);
|
||||||
|
} catch (err) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Snekfetch.version = Package.version;
|
Snekfetch.version = Package.version;
|
||||||
|
|
@ -22210,8 +22231,10 @@ ClientRequest.prototype.setHeader = function (name, value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientRequest.prototype.getHeader = function (name) {
|
ClientRequest.prototype.getHeader = function (name) {
|
||||||
var self = this
|
var header = this._headers[name.toLowerCase()]
|
||||||
return self._headers[name.toLowerCase()].value
|
if (header)
|
||||||
|
return header.value
|
||||||
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientRequest.prototype.removeHeader = function (name) {
|
ClientRequest.prototype.removeHeader = function (name) {
|
||||||
|
|
@ -22432,7 +22455,7 @@ var unsafeHeaders = [
|
||||||
'via'
|
'via'
|
||||||
]
|
]
|
||||||
|
|
||||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5).Buffer, __webpack_require__(8), __webpack_require__(6)))
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5).Buffer, __webpack_require__(8), __webpack_require__(7)))
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 98 */
|
/* 98 */
|
||||||
|
|
@ -22621,7 +22644,7 @@ IncomingMessage.prototype._onXHRProgress = function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6), __webpack_require__(5).Buffer, __webpack_require__(8)))
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7), __webpack_require__(5).Buffer, __webpack_require__(8)))
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 99 */
|
/* 99 */
|
||||||
|
|
@ -22918,7 +22941,7 @@ const Emoji = __webpack_require__(17);
|
||||||
const TextChannel = __webpack_require__(56);
|
const TextChannel = __webpack_require__(56);
|
||||||
const VoiceChannel = __webpack_require__(57);
|
const VoiceChannel = __webpack_require__(57);
|
||||||
const GuildChannel = __webpack_require__(26);
|
const GuildChannel = __webpack_require__(26);
|
||||||
const GroupDMChannel = __webpack_require__(30);
|
const GroupDMChannel = __webpack_require__(29);
|
||||||
|
|
||||||
class ClientDataManager {
|
class ClientDataManager {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
|
@ -23090,7 +23113,7 @@ class ClientManager {
|
||||||
const gateway = `${res.url}/?v=${protocolVersion}&encoding=${WebSocketConnection.ENCODING}`;
|
const gateway = `${res.url}/?v=${protocolVersion}&encoding=${WebSocketConnection.ENCODING}`;
|
||||||
this.client.emit(Constants.Events.DEBUG, `Using gateway ${gateway}`);
|
this.client.emit(Constants.Events.DEBUG, `Using gateway ${gateway}`);
|
||||||
this.client.ws.connect(gateway);
|
this.client.ws.connect(gateway);
|
||||||
this.client.ws.once('close', event => {
|
this.client.ws.connection.once('close', event => {
|
||||||
if (event.code === 4004) reject(new Error(Constants.Errors.BAD_LOGIN));
|
if (event.code === 4004) reject(new Error(Constants.Errors.BAD_LOGIN));
|
||||||
if (event.code === 4010) reject(new Error(Constants.Errors.INVALID_SHARD));
|
if (event.code === 4010) reject(new Error(Constants.Errors.INVALID_SHARD));
|
||||||
if (event.code === 4011) reject(new Error(Constants.Errors.SHARDING_REQUIRED));
|
if (event.code === 4011) reject(new Error(Constants.Errors.SHARDING_REQUIRED));
|
||||||
|
|
@ -24150,7 +24173,7 @@ module.exports = UserUpdateAction;
|
||||||
/* 138 */
|
/* 138 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
const snekfetch = __webpack_require__(39);
|
const snekfetch = __webpack_require__(38);
|
||||||
const Constants = __webpack_require__(0);
|
const Constants = __webpack_require__(0);
|
||||||
|
|
||||||
class APIRequest {
|
class APIRequest {
|
||||||
|
|
@ -24206,13 +24229,13 @@ module.exports = APIRequest;
|
||||||
/* 139 */
|
/* 139 */
|
||||||
/***/ (function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
const querystring = __webpack_require__(37);
|
const querystring = __webpack_require__(36);
|
||||||
const long = __webpack_require__(35);
|
const long = __webpack_require__(34);
|
||||||
const Permissions = __webpack_require__(9);
|
const Permissions = __webpack_require__(9);
|
||||||
const Constants = __webpack_require__(0);
|
const Constants = __webpack_require__(0);
|
||||||
const Endpoints = Constants.Endpoints;
|
const Endpoints = Constants.Endpoints;
|
||||||
const Collection = __webpack_require__(3);
|
const Collection = __webpack_require__(3);
|
||||||
const Snowflake = __webpack_require__(7);
|
const Snowflake = __webpack_require__(6);
|
||||||
const Util = __webpack_require__(4);
|
const Util = __webpack_require__(4);
|
||||||
|
|
||||||
const User = __webpack_require__(16);
|
const User = __webpack_require__(16);
|
||||||
|
|
@ -24220,11 +24243,11 @@ const GuildMember = __webpack_require__(18);
|
||||||
const Message = __webpack_require__(19);
|
const Message = __webpack_require__(19);
|
||||||
const Role = __webpack_require__(15);
|
const Role = __webpack_require__(15);
|
||||||
const Invite = __webpack_require__(46);
|
const Invite = __webpack_require__(46);
|
||||||
const Webhook = __webpack_require__(32);
|
const Webhook = __webpack_require__(31);
|
||||||
const UserProfile = __webpack_require__(183);
|
const UserProfile = __webpack_require__(183);
|
||||||
const OAuth2Application = __webpack_require__(27);
|
const OAuth2Application = __webpack_require__(27);
|
||||||
const Channel = __webpack_require__(14);
|
const Channel = __webpack_require__(14);
|
||||||
const GroupDMChannel = __webpack_require__(30);
|
const GroupDMChannel = __webpack_require__(29);
|
||||||
const Guild = __webpack_require__(25);
|
const Guild = __webpack_require__(25);
|
||||||
const VoiceRegion = __webpack_require__(184);
|
const VoiceRegion = __webpack_require__(184);
|
||||||
const GuildAuditLogs = __webpack_require__(45);
|
const GuildAuditLogs = __webpack_require__(45);
|
||||||
|
|
@ -24673,7 +24696,10 @@ class RESTMethods {
|
||||||
}
|
}
|
||||||
|
|
||||||
updateGuildMember(member, data) {
|
updateGuildMember(member, data) {
|
||||||
if (data.channel) data.channel_id = this.client.resolver.resolveChannel(data.channel).id;
|
if (data.channel) {
|
||||||
|
data.channel_id = this.client.resolver.resolveChannel(data.channel).id;
|
||||||
|
data.channel = null;
|
||||||
|
}
|
||||||
if (data.roles) data.roles = data.roles.map(role => role instanceof Role ? role.id : role);
|
if (data.roles) data.roles = data.roles.map(role => role instanceof Role ? role.id : role);
|
||||||
|
|
||||||
let endpoint = Endpoints.Member(member);
|
let endpoint = Endpoints.Member(member);
|
||||||
|
|
@ -25313,7 +25339,7 @@ UserAgentManager.DEFAULT = {
|
||||||
|
|
||||||
module.exports = UserAgentManager;
|
module.exports = UserAgentManager;
|
||||||
|
|
||||||
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)))
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
/* 143 */
|
/* 143 */
|
||||||
|
|
@ -26569,8 +26595,8 @@ module.exports = {
|
||||||
Constants: __webpack_require__(0),
|
Constants: __webpack_require__(0),
|
||||||
EvaluatedPermissions: __webpack_require__(9),
|
EvaluatedPermissions: __webpack_require__(9),
|
||||||
Permissions: __webpack_require__(9),
|
Permissions: __webpack_require__(9),
|
||||||
Snowflake: __webpack_require__(7),
|
Snowflake: __webpack_require__(6),
|
||||||
SnowflakeUtil: __webpack_require__(7),
|
SnowflakeUtil: __webpack_require__(6),
|
||||||
Util: Util,
|
Util: Util,
|
||||||
util: Util,
|
util: Util,
|
||||||
version: __webpack_require__(41).version,
|
version: __webpack_require__(41).version,
|
||||||
|
|
@ -26584,11 +26610,11 @@ module.exports = {
|
||||||
Channel: __webpack_require__(14),
|
Channel: __webpack_require__(14),
|
||||||
ClientUser: __webpack_require__(42),
|
ClientUser: __webpack_require__(42),
|
||||||
ClientUserSettings: __webpack_require__(43),
|
ClientUserSettings: __webpack_require__(43),
|
||||||
Collector: __webpack_require__(33),
|
Collector: __webpack_require__(32),
|
||||||
DMChannel: __webpack_require__(44),
|
DMChannel: __webpack_require__(44),
|
||||||
Emoji: __webpack_require__(17),
|
Emoji: __webpack_require__(17),
|
||||||
Game: __webpack_require__(11).Game,
|
Game: __webpack_require__(11).Game,
|
||||||
GroupDMChannel: __webpack_require__(30),
|
GroupDMChannel: __webpack_require__(29),
|
||||||
Guild: __webpack_require__(25),
|
Guild: __webpack_require__(25),
|
||||||
GuildAuditLogs: __webpack_require__(45),
|
GuildAuditLogs: __webpack_require__(45),
|
||||||
GuildChannel: __webpack_require__(26),
|
GuildChannel: __webpack_require__(26),
|
||||||
|
|
@ -26606,14 +26632,14 @@ module.exports = {
|
||||||
PartialGuildChannel: __webpack_require__(53),
|
PartialGuildChannel: __webpack_require__(53),
|
||||||
PermissionOverwrites: __webpack_require__(54),
|
PermissionOverwrites: __webpack_require__(54),
|
||||||
Presence: __webpack_require__(11).Presence,
|
Presence: __webpack_require__(11).Presence,
|
||||||
ReactionEmoji: __webpack_require__(31),
|
ReactionEmoji: __webpack_require__(30),
|
||||||
ReactionCollector: __webpack_require__(55),
|
ReactionCollector: __webpack_require__(55),
|
||||||
RichEmbed: __webpack_require__(73),
|
RichEmbed: __webpack_require__(73),
|
||||||
Role: __webpack_require__(15),
|
Role: __webpack_require__(15),
|
||||||
TextChannel: __webpack_require__(56),
|
TextChannel: __webpack_require__(56),
|
||||||
User: __webpack_require__(16),
|
User: __webpack_require__(16),
|
||||||
VoiceChannel: __webpack_require__(57),
|
VoiceChannel: __webpack_require__(57),
|
||||||
Webhook: __webpack_require__(32),
|
Webhook: __webpack_require__(31),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (__webpack_require__(24).platform() === 'browser') window.Discord = module.exports; // eslint-disable-line no-undef
|
if (__webpack_require__(24).platform() === 'browser') window.Discord = module.exports; // eslint-disable-line no-undef
|
||||||
|
|
|
||||||
16
discord.11.1-dev.min.js
vendored
16
discord.11.1-dev.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue