Bien démarrer
Installation
Installez glyria.js et générez votre premier bot Discord en quelques secondes.
Prérequis
- Node.js 22.x ou supérieur
- npm 10.x ou supérieur
- TypeScript 6.x ou supérieur
Installation
Installez @glyria/bot dans votre projet :
npm install @glyria/bot
Initialiser votre projet
Une fois installé, exécutez la commande init pour générer votre bot :
npx glyria init
Cela générera la structure suivante :
your-bot/
src/
commands/
events/
utils/
index.ts
.glyria/
imports.d.ts
.env
.gitignore
tsconfig.json
glyria.config.ts
package.json
Configurer votre bot
Remplissez votre fichier .env avec le token de votre bot :
TOKEN=your_bot_token_here
Rendez-vous sur le Discord Developer Portal, sélectionnez votre application, puis Bot → Reset Token.
Démarrer votre bot
# développement (hot reload)
npm run dev
# production
npm run build
npm run start
GlyriaClient, command, embedV2...) en tant que variables globales — aucun import requis dans vos fichiers de commandes.
