From 56d01ea9eb7821d60279bd309d1353212d537886 Mon Sep 17 00:00:00 2001 From: idranme Date: Thu, 25 Jul 2024 02:26:20 +0800 Subject: [PATCH] fix --- adapters/qq/src/internal/internal.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adapters/qq/src/internal/internal.ts b/adapters/qq/src/internal/internal.ts index ffe17c3d..03b99550 100644 --- a/adapters/qq/src/internal/internal.ts +++ b/adapters/qq/src/internal/internal.ts @@ -3,7 +3,7 @@ import { Bot, Dict, HTTP, makeArray } from '@satorijs/core' export class Internal { constructor(private bot: Bot, private http: () => HTTP) { } - static define(isGuild: boolean, routes: Dict>>, config: HTTP.RequestConfig = {}) { + static define(isGuild: boolean, routes: Dict>>, preset: HTTP.RequestConfig = {}) { for (const path in routes) { for (const key in routes[path]) { const method = key as HTTP.Method @@ -14,6 +14,7 @@ export class Internal { if (!args.length) throw new Error(`too few arguments for ${path}, received ${raw}`) return args.shift() }) + const config: HTTP.RequestConfig = { ...preset } if (args.length === 1) { if (method === 'GET' || method === 'DELETE') { config.params = args[0]