@satorijs/adapter-kook
Advanced tools
Comparing version 4.0.5 to 4.0.6
@@ -6,7 +6,7 @@ import { Bot, Context, Fragment, Quester, Schema, Universal } from '@satorijs/satori'; | ||
import { KookMessageEncoder } from './message'; | ||
export declare class KookBot<T extends KookBot.Config = KookBot.Config> extends Bot<T> { | ||
export declare class KookBot<C extends Context = Context, T extends KookBot.Config = KookBot.Config> extends Bot<C, T> { | ||
static MessageEncoder: typeof KookMessageEncoder; | ||
http: Quester; | ||
internal: Kook.Internal; | ||
constructor(ctx: Context, config: T); | ||
constructor(ctx: C, config: T); | ||
request<T = any>(method: Quester.Method, path: string, data?: {}, headers?: any): Promise<T>; | ||
@@ -13,0 +13,0 @@ deleteMessage(channelId: string, msg_id: string): Promise<void>; |
import { Adapter, Context, Schema } from '@satorijs/satori'; | ||
import { KookBot } from './bot'; | ||
export declare class HttpServer extends Adapter<KookBot<KookBot.BaseConfig & HttpServer.Config>> { | ||
constructor(ctx: Context, bot: KookBot); | ||
export declare class HttpServer<C extends Context = Context> extends Adapter<C, KookBot<C, KookBot.BaseConfig & HttpServer.Config>> { | ||
constructor(ctx: C, bot: KookBot<C>); | ||
connect(bot: KookBot): Promise<void>; | ||
@@ -6,0 +6,0 @@ } |
@@ -266,3 +266,3 @@ var __create = Object.create; | ||
user: adaptUser(member), | ||
name: member.nickname | ||
nick: member.nickname | ||
}), "decodeGuildMember"); | ||
@@ -269,0 +269,0 @@ var decodeRole = /* @__PURE__ */ __name((role) => ({ |
@@ -1,6 +0,6 @@ | ||
import { h, MessageEncoder, Schema } from '@satorijs/satori'; | ||
import { Context, h, MessageEncoder, Schema } from '@satorijs/satori'; | ||
import { KookBot } from './bot'; | ||
import * as Kook from './types'; | ||
export declare function isDirectChannel(channelId: string): boolean; | ||
export declare class KookMessageEncoder extends MessageEncoder<KookBot> { | ||
export declare class KookMessageEncoder<C extends Context = Context> extends MessageEncoder<C, KookBot<C>> { | ||
private path; | ||
@@ -7,0 +7,0 @@ private params; |
@@ -1,2 +0,2 @@ | ||
import { Bot, Session, Universal } from '@satorijs/satori'; | ||
import { Bot, Context, Universal } from '@satorijs/satori'; | ||
import * as Kook from './types'; | ||
@@ -10,2 +10,2 @@ export * from './types'; | ||
export declare function adaptMessage(data: Kook.Message, message?: Universal.Message, payload?: Universal.MessageLike): Universal.Message; | ||
export declare function adaptSession(bot: Bot, input: any): Session; | ||
export declare function adaptSession<C extends Context>(bot: Bot<C>, input: any): C[typeof Context.session]; |
/// <reference types="node" /> | ||
/// <reference types="ws" /> | ||
import { Adapter, Schema } from '@satorijs/satori'; | ||
import { Adapter, Context, Schema } from '@satorijs/satori'; | ||
import { KookBot } from './bot'; | ||
export declare class WsClient extends Adapter.WsClient<KookBot<KookBot.BaseConfig & WsClient.Config>> { | ||
export declare class WsClient<C extends Context = Context> extends Adapter.WsClient<C, KookBot<C, KookBot.BaseConfig & WsClient.Config>> { | ||
_sn: number; | ||
@@ -7,0 +7,0 @@ _ping: NodeJS.Timeout; |
{ | ||
"name": "@satorijs/adapter-kook", | ||
"description": "Kook (Kaiheila) Adapter for Satorijs", | ||
"version": "4.0.5", | ||
"description": "KOOK (开黑啦) Adapter for Satorijs", | ||
"version": "4.0.6", | ||
"main": "lib/index.js", | ||
@@ -26,6 +26,8 @@ "typings": "lib/index.d.ts", | ||
"chatbot", | ||
"satori" | ||
"satori", | ||
"im", | ||
"chat" | ||
], | ||
"peerDependencies": { | ||
"@satorijs/satori": "^3.0.0-rc.0" | ||
"@satorijs/satori": "^3.0.0" | ||
}, | ||
@@ -32,0 +34,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
144712