mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-04 22:16:08 +00:00
fix: uws warning when async task
This commit is contained in:
parent
da7a2ae946
commit
492d373d83
@ -1,4 +1,9 @@
|
||||
import { type APIInteraction, InteractionResponseType, InteractionType } from 'discord-api-types/v10';
|
||||
import {
|
||||
type APIInteractionResponse,
|
||||
InteractionResponseType,
|
||||
InteractionType,
|
||||
type APIInteraction,
|
||||
} from 'discord-api-types/v10';
|
||||
import { filetypeinfo } from 'magic-bytes.js';
|
||||
import type { HttpRequest, HttpResponse } from 'uWebSockets.js';
|
||||
import { OverwrittenMimeTypes } from '../api';
|
||||
@ -131,7 +136,8 @@ export class HttpClient extends BaseClient {
|
||||
break;
|
||||
default:
|
||||
await onInteractionCreate(this, rawBody, -1, async ({ body, files }) => {
|
||||
let response;
|
||||
res.cork(() => {
|
||||
let response: FormData | APIInteractionResponse;
|
||||
const headers: { 'Content-Type'?: string } = {};
|
||||
|
||||
if (files) {
|
||||
@ -170,6 +176,7 @@ export class HttpClient extends BaseClient {
|
||||
|
||||
return res.end(JSON.stringify(response));
|
||||
});
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user