MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / handleSlashCommand

Function handleSlashCommand

server/src/slack/commands.ts:32–51  ·  view source on GitHub ↗
(command: SlackSlashCommand)

Source from the content-addressed store, hash-verified

30 * Parse the slash command and route to appropriate handler
31 */
32export async function handleSlashCommand(command: SlackSlashCommand): Promise<CommandResponse> {
33 const subcommand = command.text.trim().toLowerCase().split(/\s+/)[0] || 'help';
34
35 logger.info(
36 { command: command.command, subcommand, userId: command.user_id, userName: command.user_name },
37 'Processing Slack command'
38 );
39
40 switch (subcommand) {
41 case 'status':
42 return handleStatusCommand(command);
43 case 'whoami':
44 return handleWhoamiCommand(command);
45 case 'link':
46 return handleLinkCommand(command);
47 case 'help':
48 default:
49 return handleHelpCommand(command);
50 }
51}
52
53/**
54 * /aao help - Show available commands

Callers 1

createSlackRouterFunction · 0.85

Calls 5

handleStatusCommandFunction · 0.85
handleWhoamiCommandFunction · 0.85
handleLinkCommandFunction · 0.85
handleHelpCommandFunction · 0.85
trimMethod · 0.65

Tested by

no test coverage detected