File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,16 +3,13 @@ import {
33 type Content ,
44 type Entity ,
55 EventType ,
6- type HandlerCallback ,
76 type IAgentRuntime ,
8- type Memory ,
97 Role ,
108 type Room ,
119 Service ,
1210 type TargetInfo ,
1311 type UUID ,
1412 type World ,
15- WorldPayload ,
1613 createUniqueUuid ,
1714 logger ,
1815} from '@elizaos/core' ;
@@ -21,7 +18,7 @@ import { type ChatMemberOwner, type ChatMemberAdministrator } from 'telegraf/typ
2118import { TELEGRAM_SERVICE_NAME } from './constants' ;
2219import { validateTelegramConfig } from './environment' ;
2320import { MessageManager } from './messageManager' ;
24- import { TelegramEventTypes , TelegramWorldPayload } from './types' ;
21+ import { TelegramEventTypes , type TelegramWorldPayload } from './types' ;
2522
2623/**
2724 * Class representing a Telegram service that allows the agent to send and receive messages on Telegram.
@@ -144,6 +141,13 @@ export class TelegramService extends Service {
144141 * @returns {Promise<void> } A Promise that resolves when the initialization is complete.
145142 */
146143 private async initializeBot ( ) : Promise < void > {
144+ this . bot . start ( ctx => {
145+ this . runtime . emitEvent ( [ TelegramEventTypes . SLASH_START ] , {
146+ // we don't need this
147+ //runtime: this.runtime,
148+ ctx,
149+ } ) ;
150+ } ) ;
147151 this . bot . launch ( {
148152 dropPendingUpdates : true ,
149153 allowedUpdates : [ 'message' , 'message_reaction' ] ,
You can’t perform that action at this time.
0 commit comments