Commit graph

97 commits

Author SHA1 Message Date
ac46327380
fix: add permission check and remove audio manager fallback for radio voice 2026-07-13 00:09:54 +02:00
fa5a6aab8f
fix: JDAVoiceUpdateListener null channel race drops voice server update
The local copy of JDAVoiceUpdateListener.onVoiceServerUpdate() checked
if the bot's cached voice channel was null and returned early, silently
dropping the voice server update. Discord often sends the voice server
update BEFORE the voice state update is processed by JDA, so the channel
was always null on first attempt -> Lavalink never received the update
-> voice connection never established -> timeout.

Fix: pass null channelId to Lavalink's VoiceState instead of aborting.
This matches the Kotlin original library code.
2026-07-13 00:06:22 +02:00
fdc9df2946
fix: add audio manager fallback and debug logging for radio voice connection 2026-07-12 23:59:38 +02:00
77649ff6ca
fix: wait for Lavalink node readiness before radio voice connection
The radio bot's own LavalinkClient may not be connected yet when
startRadio() is called (async connection). Without this wait, the
voice server update is forwarded to a not-yet-connected client and
lost, causing a voice connection timeout.

Also ensure the radio bot uses its own LavalinkManager (separate
LavalinkClient with radio bot's user ID) instead of sharing the
main bot's, which caused user ID mismatch.
2026-07-12 23:52:26 +02:00
cfe05144f9
fix: create separate LavalinkManager for radio bot with its own token
Radio bot is a separate Discord bot account but shared the main bot's
LavalinkManager (created with main bot's user ID). When the radio bot
connected to voice, Lavalink received voice server updates mismatched
with the expected user ID, causing voice connection timeout.

Now the radio bot creates its own LavalinkManager with its own token,
matching the pattern already used by the music bot.
2026-07-12 23:47:46 +02:00
7055fcb00d
fix: add rule34 API credentials support (required since Aug 2025) 2026-07-12 23:39:09 +02:00
28ce94b0ca
fix: enable spotify source in lavalink, add User-Agent to booru API requests 2026-07-12 23:34:24 +02:00
18c36419dc
add prompts and knowledge files 2026-07-12 22:47:27 +02:00
2e8d482940
add lavalink plugins (youtube, lavasrc) 2026-07-12 22:45:32 +02:00
49eef6716d
fix: remove cpu limit (8 cpus > vps 2 cpus) 2026-07-12 22:38:36 +02:00
868d4bbcf8
add sqlite db 2026-07-12 22:33:16 +02:00
49adad7f58
feat: image navigation, yandere/e621random commands, ai session manager, deploy script 2026-07-12 22:24:43 +02:00
deb875fd3d feat: nsfw image commands (!e621, !r34, !gelbooru) + help filtering 2026-07-07 16:03:03 +02:00
cc046d7ee6 feat: ai page parser, message scanner, lang filter, /clear, prompt rewrite 2026-07-07 01:22:21 +02:00
a111bcd674 feat: ai roleplay, gif proxy, en prompt, channel lock, .md dossiers 2026-07-07 00:12:14 +02:00
2990f01958 feat: deepseek ai, досье, парсер .txt, ролеплей roast 2026-07-06 22:29:06 +02:00
80863a9592 feat: +5 meter команд + !timer
- !simp — симп-детектор (💀/⬜)
- !vibe — вайб-чек (🎵/⬜)
- !glaze — глазурь-метр (🍩/⬜)
- !goon — гуон-детектор (💀/⬜)
- !timer <сек> — таймер с упоминанием (virtual thread)
- RatingConfig: уровни для simp/vibe/glaze
- Всего 15 meter-команд
2026-07-04 23:04:39 +02:00
d981a2eea5 feat: 3 новые meter-команды !rizz !luck !aura
- RizzCommand: 🗿 ризз-метр (харизма) с уровнями
- LuckCommand: 🍀 удача с уровнями
- AuraCommand: ✨ аура от -50 до 100 с цветами
- RatingConfig: уровни для rizz + luck
- Все зарегистрированы в EntertainmentCommandRegistrar
2026-07-04 20:42:28 +02:00
98ea510c49 test: +14 тестов + DIP интерфейсы
- SocialCommandTest: 5 тестов (hug, noMention, cooldown, self, bot)
- CustomRoleManagerTest: 8 тестов
- RadioManagerTest: 8 тестов (set/get URL, start/stop, volume)
- VoiceButtonHandlerTest: smoke test
- DIP: WarningRepository, ActiveMuteRepository, ModerationCaseRepository
  теперь интерфейсы + Sql* реализации
Все: 438 tests, 0 failures (BlackjackServiceTest flaky)
2026-07-04 20:25:25 +02:00
4b79c561f4 fix: EmbedFactoryTest + music tests (9 новых)
- EmbedFactoryTest: emptyBuilder/withColor — JDA 6.4 требует content
- TrackSchedulerTest: 7 тестов (enqueue, skip, stop, shuffle, repeat)
- LavalinkManagerTest: 2 теста (null config, guild manager cache)
Все: 424 tests, 0 failures (BlackjackServiceTest flaky)
2026-07-04 19:39:06 +02:00
6aa0d81dc6 refactor: folder structure ≤5 файлов на папку
- counter/ → counter/service/ (5 файлов)
- entertainment/commands/ → random/ (5) + rating/ (удалена)
- rating/commands/ (7 meter команд), rating/config/ (2)
- profile/ → command/, model/, service/, render/
- role/ → command/, validation/ + repository/
- voice/ → service/, listener/, handler/
- level/ → commands/, service/, listener/
- Исправлены все imports и package declarations
2026-07-04 19:31:29 +02:00
f6b037921b refactor: BotModule SRP, BlackjackService, FeatureTables, DatabaseMigration
- BotModule 149→63: @Provides вынесены в DatabaseModule
- BlackjackService 172→152, FeatureTables 193→147, DatabaseMigration 193→149
- ShutdownManager (118) уже ≤150
2026-07-04 19:19:13 +02:00
0d916fbd96 refactor: KISS/DRY/SOLID раунд + багфиксы радио/voice/message
Что сделано:
- RatingService (getDeterministicValue + cooldown — одна точка)
- ModerationHelper (trunc/err — одна точка)
- VoiceHelper (waitForCondition с таймаутом)
- SocialCommand (7 файлов → 1 Flavor enum)
- SwapCommand + CaseLookupCommand (Split SRP)
- PlayCommand 219→150, BotInitializer 182→135, RankCardGenerator (1→4)
- MetricsCollector 182→143, TrackScheduler 202→146, VoiceChannelManager 187→150
- QueueCommands 207→149, VoiceSetupPrefixCommand 183→146, ServerStatsService 187→150
- GuildMusicManager 167→150, SqlEconomyRepository 169→149, GenerateRatingsCommand 172→147
- RadioManager: таймауты, volume при старте, защита от утечки
- VoiceTracker: race condition fix + LevelUpNotifier
- MessageCooldownService: in-memory cache
- MessageListener: LevelUpNotifier вместо inline embed
- ResetLevelsButtonHandler: правильный парсинг кнопки
- OkHttp: java.net.http → OkHttp 5.4.0
- SlowmodeCommandTest: SelfMember fix
Всё: 415 tests, 2 pre-existing, checkstyle чисто
2026-07-04 18:46:27 +02:00
42948520e8 fix: update lavasrc 4.8.3, disable broken spotify, JDA 6.4.2 migration 2026-07-03 21:04:35 +02:00
108f63f7ec fix: music system improvements, radio refactoring, lavalink config 2026-07-03 01:24:36 +02:00
a764ab9b2d Remove lavmusicbot submodule, keep ref as files 2026-07-02 23:56:19 +02:00
29a21e4178 v2.3: Major refactoring, Lavalink music system, Spotify support, CI/CD
- Full refactoring: max 200 lines/file, max 3 files/dir, KISS/DRY/SOLID
- Lavalink client 3.4.0 + LavaSrc plugin (Spotify, Apple Music, Deezer)
- 3-bot architecture: main (!), music (q!), radio (r!)
- Filters: bassboost, nightcore, vaporwave, equalizer
- Slash commands for music (/play, /skip, etc.)
- Persistent queue in SQLite, auto-leave timer
- Radio manager with auto-reconnect
- Custom welcome GIF greetings via nekos.life
- JDA 5.6.1, gson 2.14, hikaricp 6.3, all deps updated
- Fixed YouTube playback via ytmsearch (LavaSrc)
- CI/CD: Docker publish + release workflows
- SpotBugs: all real bugs fixed, ignoreFailures=false
- Checkstyle: Google Style (adapted), 0 violations
2026-07-02 23:48:36 +02:00
f5398dc779 fix: add @Inject to MemberCounterListener, remove duplicate ResetLevelsCommand binding 2026-06-20 15:47:45 +02:00
53897df911 feat: Math.clamp in moderation commands, server stats charts/CSV, +121 tests, fix checkstyle warnings 2026-06-20 15:12:09 +02:00
4a3bc33356 test: 49 tests for economy services (EconomyService, BlackjackService, SlotService, JobService) 2026-06-20 00:36:57 +02:00
0787e98921 feat: configurable level roles via !levelrole admin command
- LevelRoleCommand: set/remove/clear role mappings per level
- LevelRoleService: reads from ConfigRepository, falls back to defaults
- LevelCommandRegistrar: wires new command
2026-06-20 00:33:28 +02:00
283b30f979 feat: wire economy LC to message/voice, add LevelRoleService, improve level-up embed
- MessageListener: +1-3 LC per message
- VoiceTracker: +1 LC/min periodic, +1 LC/2min on leave
- LevelRoleService: auto-assigns roles (Активный/Постоянный/Ветеран/Легенда/Мастер) at levels 5/10/20/30/50
- LevelUpNotifier: progress bar, role reward display, EmbedFactory chain
2026-06-20 00:31:19 +02:00
fe121c8546 feat: economy system with minigames, bank, rob, jobs, fishing, blackjack, slots
+ economy domain (EconomyAccount, Job, SlotCombination, EconomyTransaction)
+ EconomyRepository + SqlEconomyRepository + DB schema
+ EconomyService (transfer, daily, deposit/withdraw, stat upgrades)
+ FishingService (fish grid with difficulty levels, speed bonus)
+ BlackjackService (dealer stands on 16, ties lose)
+ SlotService (weighted combos up to x50)
+ JobService (6 jobs with level reqs and efficiency stat)
+ 11 commands: balance, baltop, pay, daily, bank, rob,
  fish, blackjack, slot, job, work
+ Tests for SqlEconomyRepository
+ EconomyModule + EconomyCommandRegistrar wired into BotModule
2026-06-20 00:23:15 +02:00
fcb5cd7207 feat: add social commands, MetricsCollector, moderation commands to feature packages 2026-06-19 23:44:10 +02:00
loki5512344
63f8763ff9 feat: add ResetLevelsCommand, user voice presets with extended settings, fix channel name format 2026-05-11 17:16:40 +02:00
loki5512344
9f6e19e5c6 refactor: move voice, counter, and role to feature/ domains 2026-05-11 17:08:17 +02:00
loki5512344
27dc060bf4 refactor: remove if-else forests from rating commands using RatingLevel pattern 2026-05-11 17:02:53 +02:00
loki5512344
376d1a2c3b docs: add task to refactor if-else forests in rating commands, fix GayCommand package 2026-05-11 16:58:31 +02:00
loki5512344
4329b988e2 refactor: entertainment commands reorganized into subfolders 2026-05-11 16:56:21 +02:00
loki5512344
fede91de5a refactor: реорганизация структуры - registry и listener подпапки, удален StopCommand, исправлен баг MetricsCommand 2026-05-11 16:53:54 +02:00
loki5512344
f460c59e2f feat: ефакторинг системы уровней + генератор профильных карточек
- Создана доменная структура feature/level/ с разделением на domain/service
- ынесены классы LevelUpResult, LevelProgress, UserStats, XpFormula
- Созданы сервисы: LevelService, MessageCooldownService, LeaderboardService
- еремещены команды и листенеры в feature/level/
- далены импорты AudioManager и мертвые ссылки на TTS
- бновлены все тесты

овая функциональность:
- енератор красивых профильных карточек (RankCardGenerator)
- оманда !profile для просмотра карточки с уровнем, XP, статистикой
- оманда !stop для безопасной остановки бота (только админы)
- обавлены ассеты: фоны, иконки, бейджи

Технические улучшения:
- ерсистентный кулдаун через UserStats.lastMessageTime
- бобщенные методы лидерборда через Comparator
- Graceful shutdown с сохранением всех данных
- Fallback на заглушки если ассеты не загрузились
2026-05-11 16:43:51 +02:00
loki5512344
aa3388cd9e Update TODO: mark Stage 1.1-1.3 as done, add reset levels command 2026-05-11 14:28:45 +02:00
loki5512344
703d0b7e49 Refactor Stage 1.1-1.3: Create repository layer, move util to core/security and integration/nekos 2026-05-11 14:27:50 +02:00
loki5512344
17f979b5d3 Update TODO: detailed refactoring plan with proper priorities and XP formula fix 2026-05-11 14:15:09 +02:00
loki5512344
64a8928d41 Refactor: remove TTS system, slash commands folder, reorganize stats leaderboard 2026-05-11 14:12:30 +02:00
loki5512344
f43db6a527 Improved help system with category selector and main page 2026-05-11 14:01:54 +02:00
loki5512344
0f664e317e Initial commit: Discord bot with XP system, voice channels, moderation logs, and member counter 2026-05-11 13:55:12 +02:00