Skip to content
Merged

Beta #47

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1e8e388
Изменения
SNIPPIK Sep 10, 2025
053141c
Исправление плеера при длинных треках
SNIPPIK Sep 10, 2025
fa0edde
Улучшения
SNIPPIK Sep 11, 2025
0a0885c
Улучшения
SNIPPIK Sep 19, 2025
79072f3
Исправления/улучшения
SNIPPIK Sep 21, 2025
c15a52c
Улучшения
SNIPPIK Sep 22, 2025
33b6e4c
Исправления/Улучшения
SNIPPIK Sep 27, 2025
eee6dbc
Исправление загрузки const CPN_CHARS
SNIPPIK Sep 27, 2025
9f4c9ed
Рефакторинг
SNIPPIK Sep 29, 2025
a80ad27
Улучшение/Исправление
SNIPPIK Oct 1, 2025
5c18a5e
Добавление явной временной синхронизации аудио потока через временные…
SNIPPIK Oct 1, 2025
19d4662
Исправления/Улучшения
SNIPPIK Oct 2, 2025
53c4c57
Низкоуровневые оптимизации буфера
SNIPPIK Oct 6, 2025
8a54764
Исправления/Улучшения
SNIPPIK Oct 10, 2025
aedd906
Улучшение
SNIPPIK Oct 10, 2025
d024f89
Исправление ошибок с encrypt, decrypt при E2EE
SNIPPIK Oct 10, 2025
6256f47
Исправление отсутствия проверки голосового канала
SNIPPIK Oct 13, 2025
bb6b43a
Улучшения
SNIPPIK Oct 13, 2025
3787783
Улучшения
SNIPPIK Oct 16, 2025
b52c8de
Улучшения/Оптимизация
SNIPPIK Oct 17, 2025
479d37f
Исправление отправки сообщений, обновление в цикле
SNIPPIK Oct 18, 2025
fe09d9d
Увеличение интервала до "Connection Error" в httpsClient
SNIPPIK Oct 18, 2025
c155f1b
Мелкие правки
SNIPPIK Oct 22, 2025
fde21f1
Улучшение/Обновление
SNIPPIK Oct 26, 2025
0902b27
Улучшения
SNIPPIK Oct 26, 2025
5aa63b1
Улучшения/Исправления
SNIPPIK Nov 10, 2025
1c143cc
Улучшения/Исправления
SNIPPIK Nov 14, 2025
d5b32a0
Hotfix
SNIPPIK Nov 14, 2025
ec2e0af
0.4.0 b1 (Beta 1)
SNIPPIK Dec 4, 2025
8338234
Обновленная диаграмма
SNIPPIK Dec 4, 2025
f2393aa
Hotfix
SNIPPIK Dec 4, 2025
7a60863
Hotfix
SNIPPIK Dec 4, 2025
4eee1da
Исправление повторного запроса в worker
SNIPPIK Dec 5, 2025
0e1117c
Исправления
SNIPPIK Dec 7, 2025
e81e7fe
Opus
SNIPPIK Dec 7, 2025
c29f757
Hotfix
SNIPPIK Dec 8, 2025
a4b0207
Исправления
SNIPPIK Dec 13, 2025
4d6ce44
Улучшение цикла
SNIPPIK Dec 13, 2025
72f4f8c
Улучшения
SNIPPIK Dec 17, 2025
7269f16
Merge branch 'main' into beta
SNIPPIK Dec 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ owner.list="" # Список разработчиков, ук
ffmpeg.path="ffmpeg" # Путь до исполняемого файла ffmpeg
duration.optimization=15 # Время от конца для блокировки смены потока

audio.fade=10 # Длительность плавного включения/выключения
audio.swap.fade=3 # Длительность плавного включения/выключения при переключении трека или применения фильтра
audio.fade=5 # Длительность плавного включения/выключения
audio.swap.fade=2 # Длительность плавного включения/выключения при переключении трека или применения фильтра
audio.volume=50 # Громкость аудио

########################################################################################################
Expand All @@ -120,16 +120,17 @@ audio.volume=50 # Громкость аудио
########################################################################################################
cache=off # Глобальный параметр кеширования
cache.file=off # Кеширование в файлы (аудио, данные треков, логи), при отключении все будет хранится в памяти
cache.dir="../build/.cache" # Куда все будет кешироваться
cache.dir="build/.cache" # Куда все будет кешироваться

########################################################################################################
### APIs Sub System ###
### Здесь можно задать кол-во выдаваемых объектов ###
########################################################################################################
APIs.limit.search=8 #Кол-во треков в поиске
APIs.limit.author=8 #Кол-во треков при запросе автора
APIs.limit.playlist=70 #Кол-во треков при получении плейлиста
APIs.limit.album=70 #Кол-во треков при получении альбома
APIs.limit.search=8 # Кол-во треков в поиске
APIs.limit.author=8 # Кол-во треков при запросе автора
APIs.limit.playlist=70 # Кол-во треков при получении плейлиста
APIs.limit.album=70 # Кол-во треков при получении альбома
APIs.limit.related=10 # Кол-во треков при похожих треков

########################################################################################################
### Имена или индикаторы emoji внутри системы discord ###
Expand Down Expand Up @@ -179,7 +180,6 @@ button.autoplay="♾"
button.queue="📑"
button.lyrics="💽"
button.filters="🎛"
button.replay="🔄"
button.stop="🟥"

########################################################################################################
Expand Down
Binary file modified .github/images/src.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 38 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h1>🌟 Discord Music Bot 💫</h1>

<h4>Incredible bot with its own voice/audio engine, scalable architecture, multiple filters and support for 6 music platforms.</h4>
<h4>Audio quality surpasses lavalink, don't believe me? Listen for yourself! Works without any drops even on ARM!</h4>
<h4>Audio quality surpasses lavalink and used E2EE 🔐, don't believe me? Listen for yourself! Works without any drops even on ARM!</h4>

<p>
English
Expand All @@ -22,9 +22,6 @@
<a href="LICENSE.md">
<img src="https://img.shields.io/badge/License-BSD3-green?style=for-the-badge" alt="License" />
</a>
<a href="https://github.com/SNIPPIK/Untitles/releases/latest">
<img src="https://img.shields.io/github/v/release/SNIPPIK/Untitles?logo=git&style=for-the-badge&include_prereleases&label=Release" alt="Latest release" />
</a>
<a href="https://github.com/SNIPPIK/Untitles/releases">
<img src="https://img.shields.io/github/downloads/SNIPPIK/Untitles/total?logo=github&style=for-the-badge&label=Downloads" alt="All downloads" />
</a>
Expand All @@ -41,27 +38,30 @@
- 👤 [`SNIPPIK`](https://github.com/SNIPPIK)
- 💡 [`GHOST-OF-THE-ABYSS`](https://github.com/GHOST-OF-THE-ABYSS) — ideas and suggestions

📢 Please report any errors or omissions in [Issues](https://github.com/SNIPPIK/UnTitles/issues)
🚫 The bot does not work 24/7 — it may be unavailable!
📢 Please report any errors or omissions in [`Issues`](https://github.com/SNIPPIK/UnTitles/issues) or [`Discord`](https://discord.gg/qMf2Sv3)
🚫 The bot does not work **24/7** — it may be unavailable!

[![Invite](https://img.shields.io/badge/Add%20the%20bot-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white)](https://discord.com/oauth2/authorize?client_id=623170593268957214)
[![Server](https://img.shields.io/badge/Support%20Server-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/qMf2Sv3)

> [!WARNING]
> ⚠️ WatKLOK (UnTitles) is a complex technical project, which is supported exclusively by 1 author `SNIPPIK`
> Incorrect use, removal of authorship or appropriation will lead to the closure of the public repository
> ⚠️ 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.

> [!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
> [!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, the load on the platforms, namely YouTube!
- Disk: ~50 MB, 200 GB is enough for caching (1.5k tracks ~1.2 GB)
- 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)

---

Expand All @@ -75,37 +75,39 @@ while (performance.now() - startBlock < 100) {}
}, 200);
```
#### 🔊 Voice engine
- Implementation of [Voice Gateway Version 8](https://discord.com/developers/docs/topics/voice-connections) [`(WebSocket + UDP + SRTP + Opus + Sodium)`](src/core/voice) + [End-to-End Encryption (DAVE Protocol)](https://discord.com/developers/docs/topics/voice-connections#endtoend-encryption-dave-protocol)
- Implementation of [**Voice Gateway Version 8**](https://discord.com/developers/docs/topics/voice-connections) [`(WebSocket + UDP + SRTP + Opus + Sodium)`](src/core/voice) + [**End-to-End Encryption (E2EE 🔐)**](https://discord.com/developers/docs/topics/voice-connections#endtoend-encryption-dave-protocol)
- 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 system for sending audio packets, its own `Jitter Buffer`!
- 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](src/core/player/filters.json)
- 16+ filters, you can add your own without complex digging in the code [**filters**](src/core/player/filters.json)
- 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: `YouTube`, `Spotify`, `VK`, `Yandex-Music`, `SoundCloud`, `Deezer`
- Audio: `YouTube`, `VK`, `Yandex-Music` **(MP3 + Lossless)**, `SoundCloud`
- Precise search in the absence of audio, by time and names by syllables
- There is a search on other platforms in the absence of audio!
- There is support for `related`(**related tracks**), inclusion of similar tracks
- 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`
- 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](src/structures/locale/languages.json))
- Available languages: `English`, `Russian` ([**file with languages**](src/structures/locale/languages.json))
- You can add any language supported by discord

---

# 🔩 Other functionality
#### Own system [handlers](src/handlers)
#### Own system [**handlers**](src/handlers)
- Universal loader: [`commands`](src/handlers/commands), [`events`](src/handlers/events), [`components`](src/handlers/components), [`middlewares`](src/handlers/middlewares), [`rest`](src/handlers/rest)
- Own framework for commands, buttons, menu selectors, events
- Decorators and interfaces are used, including typing
Expand All @@ -114,13 +116,13 @@ while (performance.now() - startBlock < 100) {}
#### 💡 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!
- Audio sending is built on it!
- 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`](src/structures/tools/SetArray.ts) - 2 in one Array and Set in one class
- [`SetArray`](src/structures/array/index.set.ts) - 2 in one Array and Set in one class
- [`Cycle`](src/structures/tools/Cycle.ts) - Manages the message update system and sending audio packets
- [`TypedEmitter`](src/structures/tools/TypedEmitter.ts) - typed `EventEmitterAsyncResource`
- [`TypedEmitter`](src/structures/tools/TypedEmitter.ts) - Custom event emitter based object
- [`SimpleWorker`](src/structures/tools/SimpleWorker.ts) - Class for working with threads

---
Expand All @@ -142,15 +144,16 @@ while (performance.now() - startBlock < 100) {}
| `/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
> Node.js or Bun is required, as well as FFmpeg installed
> All configuration is written in `.env`
> You need Node.js and FFmpeg installed.
> All parameters are specified in `.env`, don't forget to copy it to `.build` and customize it.
```shell
# Clone
git clone https://github.com/SNIPPIK/UnTitles
Expand All @@ -170,10 +173,9 @@ bun run start-bun
```

---
[![TypeScript](https://img.shields.io/badge/typescript-5.9.2-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
[![Bun](https://img.shields.io/badge/bun-1.2.25-6DA55F?style=for-the-badge&logo=bun&logoColor=white&color=white)](https://bun.com/)
[![TypeScript](https://img.shields.io/badge/typescript-5.9.3-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
[![NodeJS](https://img.shields.io/badge/node.js-23.0.0-6DA55F?style=for-the-badge&logo=node.js&logoColor=white)](https://nodejs.org/en)
[![Discord.js](https://img.shields.io/badge/discord.js-14.22-%23CB3837.svg?style=for-the-badge&logo=discord.js&logoColor=white&color=purple)](https://discord.js.org/)
[![Discord.js](https://img.shields.io/badge/discord.js-14.24.2-%23CB3837.svg?style=for-the-badge&logo=discord.js&logoColor=white&color=purple)](https://discord.js.org/)
[![WS](https://img.shields.io/badge/ws-8.18.3-%23CB3837.svg?style=for-the-badge&logo=socket&logoColor=white)](https://www.npmjs.com/package/ws)
[![FFmpeg](https://img.shields.io/badge/FFmpeg-7.*.*-%23CB3837.svg?style=for-the-badge&logo=ffmpeg&logoColor=white&color)](https://ffmpeg.org/)
---
Expand Down
Loading
Loading