mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
Update send_interaction_response.ts
This commit is contained in:
@@ -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;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user