mirror of
https://github.com/danbulant/discord.js
synced 2026-05-24 20:42:27 +00:00
switch to proper querystring parser because why not (#1077)
This commit is contained in:
parent
4a7284b86e
commit
5e7ae847de
1 changed files with 2 additions and 5 deletions
|
|
@ -1,3 +1,4 @@
|
|||
const querystring = require('querystring');
|
||||
const Constants = require('../../util/Constants');
|
||||
const Collection = require('../../util/Collection');
|
||||
const splitMessage = require('../../util/SplitMessage');
|
||||
|
|
@ -123,11 +124,7 @@ class RESTMethods {
|
|||
search(target, options) {
|
||||
options = transformSearchOptions(options, this.client);
|
||||
|
||||
const queryString = Object.keys(options)
|
||||
.filter(k => options[k])
|
||||
.map(k => [k, options[k]])
|
||||
.map(x => x.join('='))
|
||||
.join('&');
|
||||
const queryString = querystring.stringify(options);
|
||||
|
||||
let type;
|
||||
if (target instanceof Channel) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue