mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
fix: pass in the expected query object type for application commands (#8189)
This commit is contained in:
@@ -101,10 +101,7 @@ class ApplicationCommandManager extends CachedManager {
|
|||||||
headers: {
|
headers: {
|
||||||
'X-Discord-Locale': locale,
|
'X-Discord-Locale': locale,
|
||||||
},
|
},
|
||||||
query:
|
query: typeof withLocalizations === 'boolean' ? { with_localizations: withLocalizations } : undefined,
|
||||||
typeof withLocalizations === 'boolean'
|
|
||||||
? new URLSearchParams({ with_localizations: withLocalizations })
|
|
||||||
: undefined,
|
|
||||||
});
|
});
|
||||||
return data.reduce((coll, command) => coll.set(command.id, this._add(command, cache, guildId)), new Collection());
|
return data.reduce((coll, command) => coll.set(command.id, this._add(command, cache, guildId)), new Collection());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user