mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
fix: remove casts when using makeURLSearchParams() (#8877)
This commit is contained in:
@@ -29,7 +29,7 @@ export class ApplicationCommandsAPI {
|
||||
*/
|
||||
public async getGlobalCommands(applicationId: Snowflake, options: RESTGetAPIApplicationCommandsQuery = {}) {
|
||||
return this.rest.get(Routes.applicationCommands(applicationId), {
|
||||
query: makeURLSearchParams(options as Record<string, unknown>),
|
||||
query: makeURLSearchParams(options),
|
||||
}) as Promise<RESTGetAPIApplicationCommandsResult>;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ export class ApplicationCommandsAPI {
|
||||
data: RESTGetAPIApplicationGuildCommandsQuery = {},
|
||||
) {
|
||||
return this.rest.get(Routes.applicationGuildCommands(applicationId, guildId), {
|
||||
query: makeURLSearchParams(data as Record<string, unknown>),
|
||||
query: makeURLSearchParams(data),
|
||||
}) as Promise<RESTGetAPIApplicationCommandsResult>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user