fix: remove casts when using makeURLSearchParams() (#8877)

This commit is contained in:
Almeida
2022-11-28 21:22:02 +00:00
committed by GitHub
parent 1a10f48bc3
commit 7430c8e4c8
6 changed files with 19 additions and 19 deletions

View File

@@ -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>;
}