Update send_interaction_response.ts

This commit is contained in:
ITOH
2021-04-24 19:37:19 +02:00
parent 160a957323
commit 8ab3b79061
@@ -17,9 +17,13 @@ export async function sendInteractionResponse(
) {
// If its already been executed, we need to send a followup response
if (cache.executedSlashCommands.has(token)) {
return rest.runMethod("post", endpoints.WEBHOOK(applicationId, token), {
...options,
});
return await rest.runMethod(
"post",
endpoints.WEBHOOK(applicationId, token),
{
...options,
},
);
}
// Expire in 15 minutes
@@ -45,11 +49,9 @@ export async function sendInteractionResponse(
options.data = { ...options.data, allowedMentions: { parse: [] } };
}
const result = await rest.runMethod(
return await rest.runMethod(
"post",
endpoints.INTERACTION_ID_TOKEN(id, token),
options,
);
return result;
}