MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / tryHandleInlineCommand

Method tryHandleInlineCommand

src/runtime/adapters/slack.ts:370–389  ·  view source on GitHub ↗
(
    text: string,
    channelId: string,
    client: any,
    route: SlackRoute,
  )

Source from the content-addressed store, hash-verified

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);

Callers 2

handleDirectMessageMethod · 0.95
handleMentionMethod · 0.95

Calls 3

resolveInlineCommandMethod · 0.95
sendSafeMethod · 0.95
handleCommandMethod · 0.65

Tested by

no test coverage detected