@gitterm/discord-bot 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. package/README.md +4 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -182,7 +182,10 @@ const bot = createDiscordBot({
182
182
  });
183
183
 
184
184
  await bot.start();
185
- process.once("SIGTERM", () => void bot.stop());
185
+ // Stopping releases the bot's claim, so the next start doesn't wait for it to expire.
186
+ const shutdown = () => void bot.stop().finally(() => process.exit(0));
187
+ process.once("SIGINT", shutdown);
188
+ process.once("SIGTERM", shutdown);
186
189
  ```
187
190
 
188
191
  ### Add it to a bot you already run
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitterm/discord-bot",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Discord bot that runs a coding agent on your repository in a GitTerm sandbox",
5
5
  "keywords": [
6
6
  "agent",
@@ -38,7 +38,7 @@
38
38
  "start:local": "bun --watch src/cli.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@gitterm/bot": "^0.2.0",
41
+ "@gitterm/bot": "^0.2.1",
42
42
  "@gitterm/sdk": "^0.11.0",
43
43
  "discord.js": "^14.27.0"
44
44
  },