mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 08:03:30 +01:00
fix: query is optional for some endpoints (#10621)
* fix(monetization): `query` is optional * refactor: more defaults
This commit is contained in:
@@ -38,7 +38,7 @@ export class MonetizationAPI {
|
||||
*/
|
||||
public async getSKUSubscriptions(
|
||||
skuId: Snowflake,
|
||||
query: RESTGetAPISKUSubscriptionsQuery,
|
||||
query: RESTGetAPISKUSubscriptionsQuery = {},
|
||||
{ signal }: Pick<RequestData, 'signal'> = {},
|
||||
) {
|
||||
return this.rest.get(Routes.skuSubscriptions(skuId), {
|
||||
@@ -75,7 +75,7 @@ export class MonetizationAPI {
|
||||
*/
|
||||
public async getEntitlements(
|
||||
applicationId: Snowflake,
|
||||
query: RESTGetAPIEntitlementsQuery,
|
||||
query: RESTGetAPIEntitlementsQuery = {},
|
||||
{ signal }: Pick<RequestData, 'signal'> = {},
|
||||
) {
|
||||
return this.rest.get(Routes.entitlements(applicationId), {
|
||||
|
||||
@@ -26,7 +26,7 @@ export class PollAPI {
|
||||
channelId: Snowflake,
|
||||
messageId: Snowflake,
|
||||
answerId: number,
|
||||
query: RESTGetAPIPollAnswerVotersQuery,
|
||||
query: RESTGetAPIPollAnswerVotersQuery = {},
|
||||
{ signal }: Pick<RequestData, 'signal'> = {},
|
||||
) {
|
||||
return this.rest.get(Routes.pollAnswerVoters(channelId, messageId, answerId), {
|
||||
|
||||
Reference in New Issue
Block a user