Incredible bot with its own voice/audio engine, scalable architecture, multiple filters and support for 6 music platforms.
Audio quality surpasses lavalink and used E2EE π, 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 or Discord
π« The bot does not work 24/7 β it may be unavailable!
Warning
SNIPPIK
Incorrect use, removal of authorship, or attribution will result in the closure of the public repository.
Audio issues
If your internet connection is unstable, losses will occur regardless.
It is impossible to completely eliminate packet lost due to the UDP protocol and other discord limitations.
Tip
I recommend enabling the caching system in .env. This will allow tracks to be played even with a complete platform lock.
However, the voice system is simply not allowed to lose audio packets, even under critical load!
- CPU:
0-0.1% - RAM:
~80 MB, it all depends on the number of tracks, platform load, discord cache! - Disk:
~50 MB,200 GBis 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 (E2EE π) - Full implementation of SRTP:
aead_aes256_gcm,xchacha20_poly1305(via libraries) - Best audio player compared to open source solutions!
- Does not require any opus encoders/decoders, has its own opus encoder by parsing method!
- Adaptive
jitter buffer, takes into account both network delays and process latency! - Automatic voice connection delay calibration to maintain network delays.
- Requires FFmpeg, it is responsible for audio and filters!
- Supported: Autoplay, Repeat, Shuffle, Replay and more functions
- 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, without audio filters!
- Supported platforms:
YouTube,Spotify,VK,Yandex-Music,SoundCloud,Deezer - Audio:
YouTube,VK,Yandex-Music(MP3 + Lossless),SoundCloud - Audio search on other platforms is available, even if the platform refuses to serve audio!
- Completely
fallbacksystem: a track missing on one platform will be found on another! Errors are not a problem! - Related support
(including related tracks)is available. - Platforms run in a separate worker
(thread)for performance. - Everything is described in detail, with examples and a ton of interfaces for typing.
- Easy extension and addition of new platforms via the
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!
- Works on its own calculations, not on
newTime - oldTime, calculations of function delay, discrepancies after execution, etc. - Cycle accuracy
Β±0.05 mswithprocess.hrtime+performance.now
SetArray- 2 in one Array and Set in one classCycle- Manages the message update system and sending audio packetsTypedEmitter- Custom event emitter based objectSimpleWorker- 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, related) | Advanced playback |
/volume |
β | value | Player volume |
/remove |
β | value | Delete track |
/seek |
β | 00:00, int | Seeking time track |
/skip |
β | (back, to, next) | Skip tracks |
/repeat |
β | type | Type repeat |
/queue |
β | {destroy, list} | Queue management |
/avatar |
β | {user} | User avatar |
/voice |
β | (join, leave, tribune) | Voice channel |
/report |
β | (none) | Contact developer |
You need Node.js and FFmpeg installed.
All parameters are specified in.env, don't forget to copy it to.buildand customize it.
# 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
