@tritard/waterbrother 0.16.150 → 0.16.152

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/README.md CHANGED
@@ -185,6 +185,8 @@ waterbrother onboarding
185
185
  waterbrother update
186
186
  ```
187
187
 
188
+ If you are using Discord and want native slash commands to appear immediately in one server, set `channels.discord.guildId` before running `waterbrother discord sync-commands`.
189
+
188
190
  Web research examples:
189
191
 
190
192
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tritard/waterbrother",
3
- "version": "0.16.150",
3
+ "version": "0.16.152",
4
4
  "description": "Waterbrother: bring-your-own-model coding CLI with local tools, sessions, operator modes, and approval controls",
5
5
  "type": "module",
6
6
  "bin": {
package/src/discord.js CHANGED
@@ -1589,13 +1589,21 @@ async function handleDiscordSlashInteraction(runtime, interaction, { log = () =>
1589
1589
 
1590
1590
  async function handleDiscordAutocompleteInteraction(runtime, interaction, { log = () => {} } = {}) {
1591
1591
  const discord = normalizeDiscordRuntime(runtime);
1592
- const state = await loadDiscordGatewayState();
1593
- const choices = await buildDiscordAutocompleteChoices(runtime, state, interaction);
1594
- await createInteractionResponse(discord, interaction, {
1595
- type: 8,
1596
- data: { choices }
1597
- });
1598
- log(`discord: autocomplete reply in ${String(interaction?.channel_id || "").trim()}`);
1592
+ try {
1593
+ const state = await loadDiscordGatewayState();
1594
+ const choices = await buildDiscordAutocompleteChoices(runtime, state, interaction);
1595
+ await createInteractionResponse(discord, interaction, {
1596
+ type: 8,
1597
+ data: { choices }
1598
+ });
1599
+ log(`discord: autocomplete reply in ${String(interaction?.channel_id || "").trim()}`);
1600
+ } catch (error) {
1601
+ await createInteractionResponse(discord, interaction, {
1602
+ type: 8,
1603
+ data: { choices: [] }
1604
+ }).catch(() => null);
1605
+ throw error;
1606
+ }
1599
1607
  }
1600
1608
 
1601
1609
  async function buildDiscordAbout(runtime, state, message) {