Skip to content

SNIPPIK/UnTitles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 Discord Music Bot πŸ’«

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 | Русский

Title

License All downloads All Contributors


πŸ‘₯ Authors

πŸ“’ Please report any errors or omissions in Issues or Discord
🚫 The bot does not work 24/7 β€” it may be unavailable!

Invite Server

Warning

⚠️ WatKLOK (UnTitles) is a complex technical project maintained exclusively by 1 author, 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!


⚠️ Hardware requirements | Data from Ryzen 7 5700x3D | 1 player

  • CPU: 0-0.1%
  • RAM: ~80 MB, it all depends on the number of tracks, platform load, discord cache!
  • Disk: ~50 MB, 200 GB is enough for caching (1.5k tracks ~1.2 GB)

🎧 Main features

πŸŽ–οΈ Features

  • 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);

πŸ”Š Voice engine

  • 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!

🎡 Audio

  • 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!

🌐 Platforms

  • 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 fallback system: 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.

🌍 Localization

  • Available languages: English, Russian (file with languages)
  • You can add any language supported by discord

πŸ”© Other functionality

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

πŸ’‘ Adaptive loop

  • 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 ms with process.hrtime + performance.now

βš™οΈ Internal tools

  • SetArray - 2 in one Array and Set in one class
  • Cycle - Manages the message update system and sending audio packets
  • TypedEmitter - Custom event emitter based object
  • SimpleWorker - Class for working with threads

πŸŽ› Interface

  • Interactive buttons: actions depend on the player state
  • Progress bar support with time codes
  • Responsive UI - does not require reusing commands

πŸ“š 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

πŸš€ Quick start

You need Node.js and FFmpeg installed.
All parameters are specified in .env, don't forget to copy it to .build and 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

TypeScript NodeJS Discord.js WS FFmpeg

πŸ“Š Diagram of the entire project

  • In case you are interested in how the bot is built Diagram

About

This is the first discord music bot that breaks stereotypes about audio quality!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •