fix: captcha data

This commit is contained in:
Elysia
2023-06-03 13:34:56 +07:00
parent 18e7f8171f
commit c33767095c
5 changed files with 21 additions and 22 deletions

View File

@@ -879,7 +879,8 @@ class ApplicationCommand extends Base {
let nonce = SnowflakeUtil.generate();
const data = getDataPost(optionsData, nonce);
await this.client.api.interactions.post({
body: data,
data,
useFormDataPayloadJSON: true,
files: attachmentsBuffer,
});
this.client._interactionCache.set(nonce, {
@@ -975,7 +976,8 @@ class ApplicationCommand extends Base {
data.data.guild_id = message.guildId;
}
await this.client.api.interactions.post({
body: data,
data,
useFormDataPayloadJSON: true,
});
this.client._interactionCache.set(nonce, {
channelId: message.channelId,