@koishijs/plugin-adapter-discord 2.0.5 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +15 -28
- package/lib/index.js.map +2 -2
- package/lib/types/internal.d.ts +1 -1
- package/lib/utils.d.ts +1 -1
- package/lib/ws.d.ts +2 -2
- package/package.json +3 -3
package/lib/types/internal.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Dict, Quester } from 'koishi';
|
|
|
2
2
|
declare type Method = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
3
3
|
export declare class Internal {
|
|
4
4
|
private http;
|
|
5
|
-
static define(routes: Dict<Partial<Record<Method, string | string[]>>>): void;
|
|
6
5
|
constructor(http: Quester);
|
|
6
|
+
static define(routes: Dict<Partial<Record<Method, string | string[]>>>): void;
|
|
7
7
|
}
|
|
8
8
|
export {};
|
package/lib/utils.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export declare const adaptUser: (user: DC.User) => Bot.User;
|
|
|
10
10
|
export declare function adaptGroup(data: DC.Guild): Bot.Guild;
|
|
11
11
|
export declare function adaptChannel(data: DC.Channel): Bot.Channel;
|
|
12
12
|
export declare const adaptAuthor: (author: DC.User) => Bot.Author;
|
|
13
|
-
export declare function adaptMessage(
|
|
13
|
+
export declare function adaptMessage(meta: DC.Message, session?: Partial<Session>): Bot.Message;
|
|
14
14
|
export declare function adaptSession(bot: DiscordBot, input: DC.GatewayPayload): Promise<Session<never, never>>;
|
package/lib/ws.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
/// <reference types="ws" />
|
|
1
2
|
import { Adapter } from 'koishi';
|
|
2
3
|
import { AdapterConfig } from './utils';
|
|
3
4
|
import { BotConfig, DiscordBot } from './bot';
|
|
4
|
-
import WebSocket from 'ws';
|
|
5
5
|
export default class WebSocketClient extends Adapter.WebSocketClient<BotConfig, AdapterConfig> {
|
|
6
6
|
static schema: import("schemastery").default<unknown, any>;
|
|
7
|
-
prepare(bot: DiscordBot):
|
|
7
|
+
prepare(bot: DiscordBot): import("ws");
|
|
8
8
|
heartbeat(bot: DiscordBot): void;
|
|
9
9
|
accept(bot: DiscordBot): void;
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koishijs/plugin-adapter-discord",
|
|
3
3
|
"description": "Discord Adapter for Koishi",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.8",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"impl:adapter"
|
|
30
30
|
],
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"koishi": "^4.
|
|
32
|
+
"koishi": "^4.5.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@koishijs/plugin-mock": "^1.0.3",
|
|
36
36
|
"@types/es-aggregate-error": "^1.0.2",
|
|
37
|
-
"@types/ws": "^8.5.
|
|
37
|
+
"@types/ws": "^8.5.3",
|
|
38
38
|
"axios": "^0.24.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|