mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
@@ -18,7 +18,7 @@ class APIRequest {
|
||||
let queryString = '';
|
||||
if (options.query) {
|
||||
// Filter out undefined query options
|
||||
const query = Object.entries(options.query).filter(([, value]) => typeof value !== 'undefined');
|
||||
const query = Object.entries(options.query).filter(([, value]) => value !== null && typeof value !== 'undefined');
|
||||
queryString = new URLSearchParams(query).toString();
|
||||
}
|
||||
this.path = `${path}${queryString && `?${queryString}`}`;
|
||||
|
||||
Reference in New Issue
Block a user