fix(core): use auth: false for interaction callback methods (#9211)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Suneet Tipirneni
2023-03-09 06:15:32 -05:00
committed by GitHub
parent c6d98fa0c5
commit 1b29099ed0

View File

@@ -28,6 +28,7 @@ export class InteractionsAPI {
) { ) {
await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), { await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {
files, files,
auth: false,
body: { body: {
type: InteractionResponseType.ChannelMessageWithSource, type: InteractionResponseType.ChannelMessageWithSource,
data, data,
@@ -44,6 +45,7 @@ export class InteractionsAPI {
*/ */
public async defer(interactionId: Snowflake, interactionToken: string) { public async defer(interactionId: Snowflake, interactionToken: string) {
await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), { await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {
auth: false,
body: { body: {
type: InteractionResponseType.DeferredChannelMessageWithSource, type: InteractionResponseType.DeferredChannelMessageWithSource,
}, },
@@ -59,6 +61,7 @@ export class InteractionsAPI {
*/ */
public async deferMessageUpdate(interactionId: Snowflake, interactionToken: string) { public async deferMessageUpdate(interactionId: Snowflake, interactionToken: string) {
await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), { await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {
auth: false,
body: { body: {
type: InteractionResponseType.DeferredMessageUpdate, type: InteractionResponseType.DeferredMessageUpdate,
}, },
@@ -143,6 +146,7 @@ export class InteractionsAPI {
) { ) {
await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), { await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {
files, files,
auth: false,
body: { body: {
type: InteractionResponseType.UpdateMessage, type: InteractionResponseType.UpdateMessage,
data, data,
@@ -164,6 +168,7 @@ export class InteractionsAPI {
data: APICommandAutocompleteInteractionResponseCallbackData, data: APICommandAutocompleteInteractionResponseCallbackData,
) { ) {
await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), { await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {
auth: false,
body: { body: {
type: InteractionResponseType.ApplicationCommandAutocompleteResult, type: InteractionResponseType.ApplicationCommandAutocompleteResult,
data, data,
@@ -185,6 +190,7 @@ export class InteractionsAPI {
data: APIModalInteractionResponseCallbackData, data: APIModalInteractionResponseCallbackData,
) { ) {
await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), { await this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {
auth: false,
body: { body: {
type: InteractionResponseType.Modal, type: InteractionResponseType.Modal,
data, data,