// src/commands/help.js
export async function handleHelp(bot, trigger) {
  const isGroup = trigger.message.roomType === 'group';

  let text = `### ServiceChannel Bot Help\n\n`;

  if (isGroup) {
    text += `- **/woSummary** — status of the workorder linked to this space\n`;
    text += `- **/woHistory** - History of AV issues.\n`;
    text += `- **/woAttachments** — download attachments for the workorder in this space\n`;
    text += `- **/avStatus** — AV device status for the store linked to this space\n`;
    text += `- **/woApprove** — (re)post proposal approval card for current WO (when WAITING FOR APPROVAL)\n`;
  } else {
    text += `- **/woSummary <WO-number>** — status of any work order\n`;
    text += `- **/woHistory <store-number>** — History of AV issues.\n`;
    text += `- **/woAttachments <WO-number>** — download attachments for any work order\n`;
    text += `- **/avStatus <store-number>** — AV device status for any store\n`;
    text += `- **/woApprove <WO-number>** — post proposal approval card (manual)\n`;
  }

  text += `\nType **/help** again in a 1:1 or group space for context-specific commands.`;

  await bot.say('markdown', text);
}