fix: pass in the expected query object type for application commands (#8189)

This commit is contained in:
Vlad Frangu
2022-07-03 19:04:44 +03:00
committed by GitHub
parent 631abee693
commit f704b261c0

View File

@@ -101,10 +101,7 @@ class ApplicationCommandManager extends CachedManager {
headers: {
'X-Discord-Locale': locale,
},
query:
typeof withLocalizations === 'boolean'
? new URLSearchParams({ with_localizations: withLocalizations })
: undefined,
query: typeof withLocalizations === 'boolean' ? { with_localizations: withLocalizations } : undefined,
});
return data.reduce((coll, command) => coll.set(command.id, this._add(command, cache, guildId)), new Collection());
}