(
text: string,
channelId: string,
client: any,
route: SlackRoute,
)
| 368 | // ------------------------------------------------------------------------- |
| 369 | |
| 370 | private async tryHandleInlineCommand( |
| 371 | text: string, |
| 372 | channelId: string, |
| 373 | client: any, |
| 374 | route: SlackRoute, |
| 375 | ): Promise<boolean> { |
| 376 | if (!this.agent) return false; |
| 377 | |
| 378 | const commandKey = text.split(/\s/)[0].toLowerCase(); |
| 379 | const command = this.resolveInlineCommand(commandKey); |
| 380 | if (!command) return false; |
| 381 | |
| 382 | const result = await this.agent.handleCommand(command, channelId); |
| 383 | await this.sendSafe( |
| 384 | client, |
| 385 | route, |
| 386 | result.message || `${commandKey} executed.`, |
| 387 | ); |
| 388 | return true; |
| 389 | } |
| 390 | |
| 391 | private resolveInlineCommand(commandKey: string): BotCommand | undefined { |
| 392 | const resolved = resolveCommand(commandKey); |
no test coverage detected