mirror of
https://github.com/danbulant/discord.js
synced 2026-06-20 07:02:00 +00:00
Webpack build: 4a7284b86e
This commit is contained in:
parent
c626933220
commit
afe43ba382
2 changed files with 12 additions and 12 deletions
|
|
@ -21805,16 +21805,6 @@ module.exports = UserUpdateAction;
|
|||
const request = __webpack_require__(26);
|
||||
const Constants = __webpack_require__(0);
|
||||
|
||||
function getRoute(url) {
|
||||
let route = url.split('?')[0];
|
||||
if (route.includes('/channels/') || route.includes('/guilds/')) {
|
||||
const startInd = route.includes('/channels/') ? route.indexOf('/channels/') : route.indexOf('/guilds/');
|
||||
const majorID = route.substring(startInd).split('/')[2];
|
||||
route = route.replace(/(\d{8,})/g, ':id').replace(':id', majorID);
|
||||
}
|
||||
return route;
|
||||
}
|
||||
|
||||
class APIRequest {
|
||||
constructor(rest, method, url, auth, data, file) {
|
||||
this.rest = rest;
|
||||
|
|
@ -21823,7 +21813,17 @@ class APIRequest {
|
|||
this.auth = auth;
|
||||
this.data = data;
|
||||
this.file = file;
|
||||
this.route = getRoute(this.url);
|
||||
this.route = this.getRoute(this.url);
|
||||
}
|
||||
|
||||
getRoute(url) {
|
||||
let route = url.split('?')[0];
|
||||
if (route.includes('/channels/') || route.includes('/guilds/')) {
|
||||
const startInd = route.includes('/channels/') ? route.indexOf('/channels/') : route.indexOf('/guilds/');
|
||||
const majorID = route.substring(startInd).split('/')[2];
|
||||
route = route.replace(/(\d{8,})/g, ':id').replace(':id', majorID);
|
||||
}
|
||||
return route;
|
||||
}
|
||||
|
||||
getAuth() {
|
||||
|
|
|
|||
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