diff --git a/adapters/qq/src/internal/group.ts b/adapters/qq/src/internal/group.ts index 56cd5f62..99b5184e 100644 --- a/adapters/qq/src/internal/group.ts +++ b/adapters/qq/src/internal/group.ts @@ -50,9 +50,6 @@ GroupInternal.define(false, { '/v2/groups/{channel.id}/files': { POST: 'sendFileGuild', }, - '/interactions/{interaction.id}': { - PUT: 'acknowledgeInteraction', - }, '/gateway': { GET: 'getGateway', }, @@ -60,3 +57,10 @@ GroupInternal.define(false, { GET: 'getGatewayBot', }, }) + +// fxxk tencent +GroupInternal.define(false, { + '/interactions/{interaction.id}': { + PUT: 'acknowledgeInteraction', + }, +}, { responseType: 'text' }) diff --git a/adapters/qq/src/internal/internal.ts b/adapters/qq/src/internal/internal.ts index ead30284..bcb4d62b 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>>) { + 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,7 +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 = {} + const config: HTTP.RequestConfig = { ...preset } if (args.length === 1) { if (method === 'GET' || method === 'DELETE') { config.params = args[0]