pnpm run devThis will start the bot in development mode with proper signal handling.
pnpm run build
pnpm startThe bot has been configured to handle CTRL+C properly:
- Single
CTRL+C: Stops the bot gracefully - No double
CTRL+Cneeded: The bot exits immediately when receiving a signal - Clean shutdown: All processes are properly terminated
- The
scripts/dev.shscript usesexecto replace the shell process with the tsx process - This ensures that
CTRL+Csignals go directly to the bot process - The bot handles
SIGINTandSIGTERMsignals and exits immediately - No graceful shutdown delay prevents double signal issues
If you still experience issues with double CTRL+C:
- Make sure you're using
pnpm run dev(nottsx src/bot.tsdirectly) - Check that
scripts/dev.shis executable:chmod +x scripts/dev.sh - Ensure no other bot processes are running:
pkill -f "tsx src/bot.ts"