Make Discord commands and the deploy pipeline sturdier

- Defer the voice commands' reply: updating every member can take longer
  than the 3 seconds Discord allows; one member leaving no longer fails the
  whole operation.
- Replace the deprecated ephemeral option with MessageFlags, answer command
  errors in French and log when that answer itself fails; route
  autocomplete interactions to the command.
- Add /readyz, which answers 503 while the bot is not connected to Discord.
- Run npm ci and npm run check on every push; deploy main only when they
  pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-29 12:04:43 +01:00
parent a1cefe6da5
commit 362c7772ba
16 changed files with 245 additions and 176 deletions

View file

@ -1,18 +1,33 @@
name: Deploy Palico Bot
# Les contrôles tournent sur chaque branche ; le déploiement, seulement après un push sur
# main dont les contrôles ont réussi.
on:
push:
branches:
- main
pull_request:
jobs:
deploy:
check:
runs-on: docker
# Image fixée ici : celle du label « docker » (node:20-bullseye) n'est plus maintenue,
# et son miroir de sécurité renvoie 404 (échec du run 4).
container:
image: node:24-bookworm
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Syntax checks and tests
run: npm run check
deploy:
needs: check
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: docker
container:
image: node:24-bookworm
steps:
- name: Deploy on WebApps
env: