mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +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(
|
public async getSKUSubscriptions(
|
||||||
skuId: Snowflake,
|
skuId: Snowflake,
|
||||||
query: RESTGetAPISKUSubscriptionsQuery,
|
query: RESTGetAPISKUSubscriptionsQuery = {},
|
||||||
{ signal }: Pick<RequestData, 'signal'> = {},
|
{ signal }: Pick<RequestData, 'signal'> = {},
|
||||||
) {
|
) {
|
||||||
return this.rest.get(Routes.skuSubscriptions(skuId), {
|
return this.rest.get(Routes.skuSubscriptions(skuId), {
|
||||||
@@ -75,7 +75,7 @@ export class MonetizationAPI {
|
|||||||
*/
|
*/
|
||||||
public async getEntitlements(
|
public async getEntitlements(
|
||||||
applicationId: Snowflake,
|
applicationId: Snowflake,
|
||||||
query: RESTGetAPIEntitlementsQuery,
|
query: RESTGetAPIEntitlementsQuery = {},
|
||||||
{ signal }: Pick<RequestData, 'signal'> = {},
|
{ signal }: Pick<RequestData, 'signal'> = {},
|
||||||
) {
|
) {
|
||||||
return this.rest.get(Routes.entitlements(applicationId), {
|
return this.rest.get(Routes.entitlements(applicationId), {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export class PollAPI {
|
|||||||
channelId: Snowflake,
|
channelId: Snowflake,
|
||||||
messageId: Snowflake,
|
messageId: Snowflake,
|
||||||
answerId: number,
|
answerId: number,
|
||||||
query: RESTGetAPIPollAnswerVotersQuery,
|
query: RESTGetAPIPollAnswerVotersQuery = {},
|
||||||
{ signal }: Pick<RequestData, 'signal'> = {},
|
{ signal }: Pick<RequestData, 'signal'> = {},
|
||||||
) {
|
) {
|
||||||
return this.rest.get(Routes.pollAnswerVoters(channelId, messageId, answerId), {
|
return this.rest.get(Routes.pollAnswerVoters(channelId, messageId, answerId), {
|
||||||
|
|||||||
Reference in New Issue
Block a user