@hogsend/cli 0.24.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js CHANGED
@@ -545,10 +545,15 @@ async function runConnectDiscord(deps, opts) {
545
545
  ` secrets stored ${info.credentialStored ? "yes" : "no"}`,
546
546
  ` interactions ${info.botInstalled ? "wired" : "not wired"}`,
547
547
  ` guild id ${info.guildId ?? "(not yet captured)"}`,
548
- ` ingress secret ${info.ingressSecretConfigured ? "set" : "unset"}`,
548
+ ` worker online ${info.workerOnline ? "yes" : "no"}`,
549
549
  ` install url ${info.installUrl ?? "(stored secrets first)"}`
550
550
  ].join("\n")
551
551
  );
552
+ if (info.credentialStored && !info.workerOnline) {
553
+ deps.out.log(
554
+ "Worker offline: set DISCORD_BOT_TOKEN + the API's REDIS_URL on the worker service and redeploy. If it stays offline with the token set, enable the 3 privileged gateway intents in the Discord portal."
555
+ );
556
+ }
552
557
  return {
553
558
  verdict: info.botInstalled ? "connected" : "secrets_stored_not_wired",
554
559
  providerId: "discord",
@@ -587,6 +592,13 @@ async function runConnectDiscord(deps, opts) {
587
592
  })
588
593
  );
589
594
  } catch (err) {
595
+ if (isHttpError(err) && err.status === 404) {
596
+ throw new ConnectDiscordError(
597
+ "store_failed",
598
+ "this instance has not mounted the Discord admin routes (PUT /v1/admin/connectors/discord/secrets returned 404)",
599
+ "Mount the consumer /secrets + /wire routes \u2014 see docs/connect-discord-consumer-routes.md."
600
+ );
601
+ }
590
602
  throw new ConnectDiscordError("store_failed", errMsg(err));
591
603
  }
592
604
  const stored = await deps.out.step(
@@ -628,6 +640,13 @@ Wire it against your deployed instance:
628
640
  HINT_LOOPBACK
629
641
  );
630
642
  }
643
+ if (isHttpError(err) && err.status === 404) {
644
+ throw new ConnectDiscordError(
645
+ "wire_failed",
646
+ "this instance has not mounted the Discord /wire route (404)",
647
+ "Mount the consumer /secrets + /wire routes \u2014 see docs/connect-discord-consumer-routes.md."
648
+ );
649
+ }
631
650
  throw new ConnectDiscordError("wire_failed", errMsg(err));
632
651
  }
633
652
  let opened = false;