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 its already been executed, we need to send a followup response
if (cache.executedSlashCommands.has(token)) { if (cache.executedSlashCommands.has(token)) {
return rest.runMethod("post", endpoints.WEBHOOK(applicationId, token), { return await rest.runMethod(
"post",
endpoints.WEBHOOK(applicationId, token),
{
...options, ...options,
}); },
);
} }
// Expire in 15 minutes // Expire in 15 minutes
@@ -45,11 +49,9 @@ export async function sendInteractionResponse(
options.data = { ...options.data, allowedMentions: { parse: [] } }; options.data = { ...options.data, allowedMentions: { parse: [] } };
} }
const result = await rest.runMethod( return await rest.runMethod(
"post", "post",
endpoints.INTERACTION_ID_TOKEN(id, token), endpoints.INTERACTION_ID_TOKEN(id, token),
options, options,
); );
return result;
} }