Modernize Discord bot to v14 and Node.js 22
Major upgrades and architectural improvements: - Upgrade Discord.js from v12 to v14.21.0 - Upgrade Node.js from 14 to 22 LTS - Switch to pnpm package manager - Complete rewrite with modern Discord API patterns New Features: - Hybrid command system: prefix commands + slash commands - /sfx slash command with autocomplete for sound discovery - Modern @discordjs/voice integration for audio - Improved voice connection management - Enhanced logging for SFX commands - Multi-stage Docker build for optimized images Technical Improvements: - Modular architecture with services and command handlers - Proper intent management for Discord gateway - Better error handling and logging - Hot-reload capability maintained - Environment variable support - Optimized Docker container with Alpine Linux Breaking Changes: - Moved main entry from index.js to src/index.js - Updated configuration structure for v14 compatibility - Replaced deprecated voice APIs with @discordjs/voice - Updated audio dependencies (opus, ffmpeg) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
30
package.json
30
package.json
@@ -1,20 +1,28 @@
|
||||
{
|
||||
"name": "ghbot",
|
||||
"version": "1.6.9",
|
||||
"version": "2.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"main": "src/index.js",
|
||||
"dependencies": {
|
||||
"axios": "^0.21.2",
|
||||
"discord.js": "^12.5.3",
|
||||
"libsodium-wrappers": "^0.7.9",
|
||||
"node-schedule": "^2.0.0",
|
||||
"opusscript": "^0.0.8"
|
||||
"axios": "^1.11.0",
|
||||
"discord.js": "^14.21.0",
|
||||
"@discordjs/voice": "^0.18.0",
|
||||
"@discordjs/opus": "^0.9.0",
|
||||
"opusscript": "^0.1.1",
|
||||
"ffmpeg-static": "^5.2.0",
|
||||
"node-schedule": "^2.1.1",
|
||||
"sodium-native": "^4.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.0.0",
|
||||
"nodemon": "^3.1.9"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"scripts": {
|
||||
"build": "docker build -t ghbot:latest .",
|
||||
"start": "docker run -d --name ghbot ghbot:latest"
|
||||
"start": "node src/index.js",
|
||||
"dev": "nodemon src/index.js",
|
||||
"docker:build": "docker build -t ghbot:${VERSION:-latest} .",
|
||||
"docker:run": "docker run -d --name ghbot --restart always ghbot:${VERSION:-latest}"
|
||||
},
|
||||
"author": "",
|
||||
"author": "https://github.com/greenham",
|
||||
"license": "MIT"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user