Incredible bot with its own voice/audio engine, scalable architecture, multiple filters and support for 6 music platforms.
Audio quality surpasses lavalink, don't believe me? Listen for yourself! Works without any drops even on ARM!
English | Π ΡΡΡΠΊΠΈΠΉ
- π€
SNIPPIK
- π‘
GHOST-OF-THE-ABYSS
β ideas and suggestions
π’ Please report any errors or omissions in Issues
π« The bot does not work 24/7 β it may be unavailable!
Warning
SNIPPIK
Incorrect use, removal of authorship or appropriation will lead to the closure of the public repository
Important
If there is no response from YouTube - install ytdlp-nodejs
. It is strongly recommended to enable caching
main
β stable, but rarely updated branch
beta
β newest fixes and features, may be unstable
- CPU: 0-0.1%
- Ram: ~80 MB, it all depends on the number of tracks, the load on the platforms, namely YouTube!
- Disk: ~50 MB, 200 GB is enough for caching (1.5k tracks ~1.2 GB)
- Not afraid of the event loop, even in this case the sound goes smoothly!!!
setInterval(() => {
const startBlock = performance.now();
while (performance.now() - startBlock < 100) {}
}, 200);
- Implementation of Voice Gateway Version 8
(WebSocket + UDP + SRTP + Opus + Sodium)
+ End-to-End Encryption (DAVE Protocol) - Full implementation of SRTP:
aead_aes256_gcm
,xchacha20_poly1305
(via libraries) - Does not require any opus encoders/decoders, has its own opus encoder by parsing method!
- Adaptive system for sending audio packets, its own
Jitter Buffer
! - Requires FFmpeg, it is responsible for audio and filters!
- Works even with strong event loop lag!
- It is possible to reuse audio without conversion if it is less than 8 minutes long
- Smooth fade-in/fade-out transition between tracks, even with skip, seek and tp.
- There is a system of smooth transition from one audio to another
Hot audio swap
- 16+ filters, you can add your own without complex digging in the code filters
- There is support for long videos, Live video is still raw.
- There is an explicit synchronization of the audio stream
- Support for
YouTube
,Spotify
,VK
,Yandex-Music
,SoundCloud
,Deezer
- Precise search in the absence of audio, through time and names by syllables
- If searching on other platforms in the absence of audio!
- Platforms work in a separate worker (thread) for performance
- Everything is described in detail, there are examples and a bunch of interfaces for typing
- Easy expansion and addition of new platforms via
Dynamic Loader - Handler
- Available languages:
English
,Russian
(file with languages) - You can add any language supported by discord
Own system handlers
- Universal loader:
commands
,events
,components
,middlewares
,rest
- Own framework for commands, buttons, menu selectors, events
- Decorators and interfaces are used, including typing
- Support for "hot" reloading
- It is not afraid of event loop and drift, it just takes them into account not as a problem, but as parameters!
- The loop can work ahead from 0 to 2 ms to process objects in the loop!
- Audio sending is built on it!
- Cycle accuracy
Β±0.05 ms
withDate.now
+performance.now
SetArray
- 2 in one Array and Set in one classCycle
- Manages the message update system and sending audio packetsTypedEmitter
- typedEventEmitterAsyncResource
SimpleWorker
- Class for working with threads
- Interactive buttons: actions depend on the player state
- Progress bar support with time codes
- Responsive UI - does not require reusing commands
Command | Autocomplete | Arguments | Description |
---|---|---|---|
/api |
β | access:(block, unblock) | API management |
/bot |
β | restart:(commands, bot, events) | Restart |
/filter |
β | (off, push, disable) | Audio filters |
/play |
β | (query) | Playback |
/player |
β | (api, replay, stop, wave) | Advanced playback |
/volume |
β | value | Player volume |
/remove |
β | value | Delete track |
/seek |
β | 00:00, int | Seeking time track |
/skip |
β | (back, to, next) | Skip tracks |
/queue |
β | {destroy, list} | Queue management |
/avatar |
β | {user} | User avatar |
/voice |
β | (join, leave, tribune) | Voice channel |
/report |
β | (none) | Contact developer |
Node.js or Bun is required, as well as FFmpeg installed
All configuration is written in.env
# Clone
git clone https://github.com/SNIPPIK/UnTitles
cd UnTitles
# Install dependencies
npm install
# Run via Node.js
# configure environment variables in build/.env
npm run build && npm run start
# Run via Bun
# configure environment variables in ./env
npm i dotenv
bun run start-bun