Blaze
BlaZe™ is an advanced Discord music bot built with Discord.js v14, Kazagumo and Lavalink, offering seamless music playback, queue management, powerful player co
소개
README.md
목차
Overview
A modular Discord application built using modern JavaScript technologies and a dedicated audio-processing infrastructure.
The project integrates Discord.js, Kazagumo, Shoukaku and Lavalink to manage music playback, player sessions, voice communication and audio processing.
Its architecture focuses on modularity, reliability, maintainability and extensibility.
Project Information
| Property | Details |
|---|---|
| Runtime | Node.js 20+ |
| Language | JavaScript |
| Discord Library | Discord.js v14 |
| Music Manager | Kazagumo |
| Audio Manager | Shoukaku |
| Audio Server | Lavalink v4 |
| Database | MongoDB |
| Repository | fraudelis/blaze |
| License | MIT |
Core Systems
Music Playback
- Track searching and loading.
- Lavalink audio streaming.
- Automatic track progression.
- Voice connection management.
- Player initialization.
- Playback state management.
Queue Management
- Add and remove tracks.
- Shuffle playback order.
- Clear upcoming tracks.
- Display queue information.
- Automatic next-track handling.
Interactive Controls
- Play and pause.
- Resume playback.
- Skip and stop.
- Volume adjustment.
- Previous track support, if implemented.
- Audio filter management.
Personal Collections
- Favourite tracks.
- Personal playlists.
- Saved music collections.
- Persistent user preferences.
Technology Stack
| Technology | Purpose |
|---|---|
| Node.js | Runtime |
| JavaScript | Development |
| Discord.js | Discord API |
| Kazagumo | Music management |
| Shoukaku | Lavalink communication |
| Lavalink | Audio processing |
| MongoDB | Persistent storage |
System Architecture
flowchart TD
A["Discord User"] --> B["Discord API"]
B --> C["Discord.js"]
C --> D["Command Handler"]
D --> E["Kazagumo"]
E --> F["Shoukaku"]
F --> G["Lavalink"]
G --> H["Audio Processing"]
H --> I["Discord Voice"]
D --> J["MongoDB"]
E --> K["Player Events"]
Playback Workflow
flowchart TD
A["Track Request"] --> B["Input Validation"]
B --> C["Track Search"]
C --> D["Track Loading"]
D --> E["Player Initialization"]
E --> F["Queue Processing"]
F --> G["Audio Playback"]
G --> H["Track Completion"]
H --> I["Next Track"]
Audio Filters
| Filter | Function |
|---|---|
| Bass Boost | Enhance low frequencies |
| Nightcore | Modify speed and pitch |
| Vaporwave | Slower playback effect |
| Karaoke | Vocal reduction |
| Tremolo | Volume modulation |
| Vibrato | Pitch modulation |
| Rotation | Stereo rotation |
| Equalizer | Frequency adjustment |
| Low-pass | Frequency filtering |
| Timescale | Playback speed |
Filter availability depends on Lavalink plugins and configuration.
Installation
Requirements
- Node.js 20+
- npm
- Discord application
- Lavalink v4
- MongoDB, if required
Clone Repository
git clone https://github.com/fraudelis/blaze.git
cd blaze
Install Dependencies
npm install
Configure Environment
Create a .env file:
TOKEN=YOUR_DISCORD_BOT_TOKEN
CLIENT_ID=YOUR_DISCORD_APPLICATION_ID
MONGO_URI=YOUR_MONGODB_URI
LAVALINK_HOST=localhost
LAVALINK_PORT=2333
LAVALINK_PASSWORD=YOUR_LAVALINK_PASSWORD
Start Application
npm start
If no start script exists:
node index.js
Lavalink Configuration
Example application.yml:
server:
port: 2333
lavalink:
server:
password: "YOUR_SECURE_PASSWORD"
sources:
youtube: false
bandcamp: true
soundcloud: true
twitch: true
vimeo: true
http: true
local: false
Project Structure
blaze/
│
├── src/
│ ├── commands/
│ │ ├── music/
│ │ └── utility/
│ │
│ ├── events/
│ │ ├── client/
│ │ └── music/
│ │
│ ├── handlers/
│ ├── database/
│ ├── music/
│ ├── structures/
│ └── utils/
│
├── config/
├── models/
├── .env.example
├── .gitignore
├── package.json
└── index.js
Adjust this structure to match the actual repository.
Player Lifecycle
stateDiagram-v2
[*] --> Idle
Idle --> Connecting
Connecting --> Ready
Ready --> Playing
Playing --> Paused
Paused --> Playing
Playing --> Idle: Queue Empty
Ready --> Destroyed
Destroyed --> [*]
Development Standards
| Principle | Description |
|---|---|
| Modularity | Independent application components |
| Reliability | Connection and error handling |
| Performance | Efficient asynchronous operations |
| Maintainability | Consistent code structure |
| Security | Protected credentials |
| Scalability | Extensible architecture |
Security
- Store credentials in environment variables.
- Never publish private tokens.
- Validate user permissions.
- Protect database credentials.
- Validate incoming interactions.
- Keep dependencies updated.
Troubleshooting
| Problem | Solution |
|---|---|
| Invalid token | Verify Discord credentials |
| Lavalink unavailable | Check host and port |
| Authentication failed | Verify Lavalink password |
| No search results | Check configured sources |
| Database error | Verify MongoDB URI |
| Voice connection failed | Check bot permissions |
| Startup error | Review application logs |
Contribution Guidelines
- Fork the repository.
- Create a development branch.
- Implement your changes.
- Test your implementation.
- Commit your changes.
- Submit a pull request.
License
Distributed under the MIT License. See the LICENSE file for details.
변수
배포할 때 입력하는 값이에요. 배포의 환경 변수가 돼요.
DISCORD_TOKENDISCORD_TOKEN 필수, 시크릿DISCORD_CLIENT_IDDISCORD_CLIENT_ID 필수BOT_OWNER_IDSBOT_OWNER_IDS 필수BOT_PREFIXBOT_PREFIX 필수BOT_COLORBOT_COLOR 필수
배포 방법
- 1 배포 페이지 열기배포 이름을 정하세요. 확인할 때 로그인해요.
- 2 변수 채우기템플릿이 요구하는 값이며 배포의 환경 변수로 저장돼요.
- 3 리소스 확인요금제의 공유 풀에서 가져와 실행해요. 모든 계정은 무료로 시작해요.