@elizaos/plugin-telegram 1.0.0-alpha.2 → 1.0.0-alpha.21
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/dist/index.js +531 -103
- package/dist/index.js.map +1 -1
- package/package.json +7 -5
- package/dist/index.d.ts +0 -33
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/plugin-telegram",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -27,13 +27,15 @@
|
|
|
27
27
|
"vitest": "1.6.1"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
|
-
"build": "tsup
|
|
31
|
-
"dev": "tsup --
|
|
30
|
+
"build": "tsup",
|
|
31
|
+
"dev": "tsup --watch",
|
|
32
32
|
"test": "vitest run",
|
|
33
|
-
"test:watch": "vitest"
|
|
33
|
+
"test:watch": "vitest",
|
|
34
|
+
"lint": "biome check ./src --config-path=./ --apply-unsafe && biome format ./ --config-path=./ --write",
|
|
35
|
+
"clean": "rm -rf dist .turbo node_modules .turbo-tsconfig.json tsconfig.tsbuildinfo"
|
|
34
36
|
},
|
|
35
37
|
"publishConfig": {
|
|
36
38
|
"access": "public"
|
|
37
39
|
},
|
|
38
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "a1bb2c8ab6805f9585540a9a9e6b6ae39bfd4ed1"
|
|
39
41
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { IAgentRuntime, Plugin, Service } from '@elizaos/core';
|
|
2
|
-
import { Update } from '@telegraf/types';
|
|
3
|
-
import { Telegraf, Context, NarrowedContext } from 'telegraf';
|
|
4
|
-
|
|
5
|
-
declare class MessageManager {
|
|
6
|
-
bot: Telegraf<Context>;
|
|
7
|
-
protected runtime: IAgentRuntime;
|
|
8
|
-
constructor(bot: Telegraf<Context>, runtime: IAgentRuntime);
|
|
9
|
-
private processImage;
|
|
10
|
-
private sendMessageInChunks;
|
|
11
|
-
private sendMedia;
|
|
12
|
-
private splitMessage;
|
|
13
|
-
handleMessage(ctx: Context): Promise<void>;
|
|
14
|
-
handleReaction(ctx: NarrowedContext<Context<Update>, Update.MessageReactionUpdate>): Promise<void>;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare class TelegramService extends Service {
|
|
18
|
-
static serviceType: string;
|
|
19
|
-
capabilityDescription: string;
|
|
20
|
-
private bot;
|
|
21
|
-
messageManager: MessageManager;
|
|
22
|
-
private options;
|
|
23
|
-
constructor(runtime: IAgentRuntime);
|
|
24
|
-
static start(runtime: IAgentRuntime): Promise<TelegramService>;
|
|
25
|
-
static stop(runtime: IAgentRuntime): Promise<void>;
|
|
26
|
-
stop(): Promise<void>;
|
|
27
|
-
private initializeBot;
|
|
28
|
-
private isGroupAuthorized;
|
|
29
|
-
private setupMessageHandlers;
|
|
30
|
-
}
|
|
31
|
-
declare const telegramPlugin: Plugin;
|
|
32
|
-
|
|
33
|
-
export { TelegramService, telegramPlugin as default };
|