Commit Graph
203 Commits
Author SHA1 Message Date
anthorob 05b4a2ab85 Refactor persistable-task system with self-registering tasks
Replaced metadata-driven reflection with self-describing `PersistableTask` types and a new `PersistableTaskRegistry`. Removed `persistable-tasks.json` and `TaskRegistry`, migrating to type-safe DI instantiation and explicit `restore()` methods. Fixed task restoration issues, ensuring `EmojiReactionRoleTask` and its `emojiMapping` now persist and restore correctly. Introduced `typeId()` for stable task identification, updated payload serialization for symmetry, and applied database migration to map FQCNs to logical IDs. Added unit tests for robust type discovery, payload symmetry, and registry behavior, ensuring no breaking changes.
2026-09-25 07:35:45 -04:00
anthorob 9f2e15a622 Remove NetNeutralityBot placeholder. 2026-09-25 07:00:24 -04:00
anthorob ffb1095f23 Replace System.exit with exceptions for safer shutdown
Refactored various parts of the application to replace calls to `System.exit` with appropriate `IllegalStateException` usage. Improved modularity and testability by delegating error handling to specific exception cases instead of terminating the JVM directly. Updated related components to ensure proper cleanup and graceful shutdown behavior during failures.
2026-09-25 06:46:31 -04:00
anthorob 4277db3922 Refactor shared.util package to utils and update imports
Moved all classes from the `shared.util` package to `utils` for improved consistency and clarity. Updated imports across all affected files to reference the new package structure. This change simplifies the codebase by aligning utility classes under a single, consistent namespace. Verified functionality and ensured no breaking changes.
2026-09-25 06:38:58 -04:00
anthorob 36c4acb13a Upgrade to Javalin 7 and refactor route registration
Updated the dependency to Javalin v7.2.3 and refactored route registration to use the new `RoutesConfig` API. Adjusted `GuildRoutes`, `ActionRoutes`, and `WebApi` to align with updated conventions and centralized route definitions. Improved modularity, reduced redundancy, and ensured backward compatibility by migrating exception and error handler logic. Updated tests to comply with the refactored APIs and structure.
2026-09-25 06:36:00 -04:00
anthorob 4cf7c47645 Remove Lavaplayer and migrate to Lavalink
Replaced the bot's audio handling system by removing Lavaplayer dependencies and migrating to a Lavalink v4 node. Updated `MusicManager`, `TrackScheduler`, and related classes to utilize the `LavalinkClient`. Refactored playlist and track loading logic, task integrations, and event dispatch to integrate with the remote node. Deprecated the custom Udio source, preserving references for a future plugin port. Documented configuration and deployment details for the new audio architecture.
2026-09-23 15:08:06 -04:00
anthorob 01bfe22d22 Migrate HTTP server to Javalin and remove legacy handlers
Replaced the existing HttpServer implementation and associated handler classes (`AbstractHandler`, `ActionHandler`, `GuildHandler`, `RootHandler`) with a Javalin-based routing system. Improved modularity by introducing `ActionRoutes` and `GuildRoutes` for route definitions, and centralized JSON mapping using `GsonJsonMapper`. Simplified caching via the new `ResponseCache` utility, updated `WebModule` for cleaner timeout handling, and extended test coverage for API endpoints.
2026-09-23 12:07:38 -04:00
anthorob 5f6265db01 Improve task lifecycle handling and optimize TaskManagerImpl
Redesigned task lifecycle management to properly cascade parent-child removals and synchronize database persistence on task deletion. Refactored task management to address memory leaks, concurrency collisions, and pending-task cleanup issues. Enhanced lookup performance, logging accuracy, and test coverage with a comprehensive unit test suite validating all task scenarios.
2026-09-23 10:07:26 -04:00
anthorob a507b471b4 cleanup 2026-09-10 08:32:16 -04:00
anthorob 868dbea8df Refactor CommandProcessor to enhance modularity and extensibility
Decomposed the monolithic `dispatch()` method into modular components using `CommandPrecondition`, `ResultHandler`, and `UsageValidator`. Replaced inline checks and tightly-coupled logic with composable, testable classes, eliminating `instanceof` dependencies. Preserved existing behavior and improved maintainability for future feature additions.
2026-09-10 08:24:21 -04:00
anthorob dd1c4dd42f Refactor thread management for improved safety and performance
Replaced unbounded thread pools in `ThreadManager` with bounded `ThreadPoolExecutor` to prevent memory exhaustion under load. Refactored shutdown logic to handle exceptions per-executor, set threads to daemon mode in `BaseThreadFactory`, and aligned synchronization patterns across multiple classes (`TaskManagerImpl`, `ChannelMessagePurger`, and `MusicManager`). Addressed lock cleanup races, double unlock issues, and static collection thread-safety concerns.
2026-09-10 07:57:49 -04:00
anthorob 64f4890931 Refactor settings architecture and remove singleton pattern
Reworked `Settings` class to replace the static singleton pattern with constructor injection of `SettingsProvider`, improving testability and modularity. Updated all affected classes, tests, and configurations to align with the new architecture.
2026-09-10 05:59:55 -04:00
anthorob 1d737a2a4f Migrate scheduled tasks to a new package and architecture
Refactored scheduled tasks and moved them to a dedicated `scheduled` package. Replaced the legacy `ScheduledTaskManager` and `ScheduledTask` definitions with a redesigned architecture to improve maintainability. Updated related classes and configurations to adopt the new structure.
2026-09-09 15:10:33 -04:00
anthorob 1b981abdf7 Add unit tests and refactor music service classes 2026-09-06 16:21:45 -04:00
anthorob b8786c8dc9 Remove deprecated classes and static singleton-based architecture 2026-09-06 07:38:02 -04:00
anthorob c442619531 remove harcoded html tag, parses next chunks to find track 2026-03-15 01:41:18 -04:00
anthorob 1a0434ffed Resolve "Job Failed #8956" 2026-03-09 07:30:25 +00:00
anthorob d3da68f4d4 move to jdk 25 2026-03-04 04:57:53 +00:00
Renovate 2c96f8ce85 fix(deps): update dependency net.dv8tion:jda to v6 2025-12-19 09:02:07 +00:00
Renovate e8c331fa63 fix(deps): update dependency dev.lavalink.youtube:v2 to v1.16.0 2025-11-14 17:45:54 +00:00
anthorob 6fc3dc9577 Command processor testing 2025-10-27 07:08:56 +00:00
Renovate 3a678ae859 fix(deps): update dependency dev.lavalink.youtube:v2 to v1.15.0 2025-10-26 15:43:39 +00:00
Renovate 6b2d64388d fix(deps): update dependency com.squareup.okhttp3:okhttp to v5 2025-10-22 21:47:31 +00:00
Renovate 47ced9d0f2 fix(deps): update flyway to v11.14.1 2025-10-22 21:27:32 +00:00
anthorob 78002d9299 Implement scheduled tasks 2025-10-22 20:11:03 +00:00
Renovate fc4dd64dff fix(deps): update dependency dev.lavalink.youtube:v2 to v1.13.3 2025-07-04 16:45:50 +00:00
Renovate 39111235f7 fix(deps): update dependency net.dv8tion:jda to v5.6.1 2025-06-22 00:32:47 +00:00
Renovate c95f461300 fix(deps): update dependency net.dv8tion:jda to v5.5.1 2025-06-09 13:00:07 +00:00
Renovate 069002a534 fix(deps): update dependency org.gitlab4j:gitlab4j-api to v6.0.0-rc.10 2025-06-03 13:55:57 +00:00
anthorob 41d6de7219 Resolve "Flyway migrations" 2025-05-22 13:09:36 +00:00
anthorob c055ac84c6 Fix music player 2025-05-21 16:30:43 +00:00
Renovate 8e4a6841cc fix(deps): update dependency net.dv8tion:jda to v5.4.0 2025-04-24 06:37:58 +00:00
Renovate 030d816caf fix(deps): update dependency net.dv8tion:jda to v5.3.2 2025-04-20 16:50:44 +00:00
Renovate ffd2f05509 fix(deps): update dependency net.dv8tion:jda to v5.3.1 2025-03-31 15:38:25 +00:00
Renovate 143e96ec46 fix(deps): update dependency net.dv8tion:jda to v5.3.0 2025-03-12 01:20:06 +00:00
anthorob 1242118b0d Version 3.0 2025-03-09 20:08:43 +00:00
anthorob 5775493b2c refactor: fix inspection errors for deprecated calls and concatenation 2024-07-14 13:59:38 -04:00
anthorob ad00a6b542 refactor: Remove unused command 2024-07-14 12:16:29 -04:00
anthorob a9ddfa8b63 Merge branch 'master' into 'dev'
# Conflicts:
#   LICENSE
2024-07-14 15:57:47 +00:00
anthorob 7ad2740a2b refactor: add release to Sentry config 2024-07-14 01:35:08 -04:00
anthorob 2aa75ce0fc refactor: remove convoluted TrackLoader and LoadableSongs abstraction
BREAKING CHANGE: removed TrackLoader amd LoadableSongs
2024-07-14 00:28:44 -04:00
anthorob 0db751af44 refactor(LogHandler): use the exception itself instead of a string for buildSentryErrorMessage 2024-07-14 00:12:14 -04:00
anthorob aba0441021 fix: fix relection package to new path 2024-07-14 00:00:42 -04:00
anthorob 2099c1753a fix: fix wrongly named environment variables 2024-07-13 23:55:21 -04:00
anthorob f4c7e9c703 refactor: change package path to reflect group id of pom.xml
BREAKING CHANGE:
2024-07-13 23:10:06 -04:00
anthorob 2b08351f6d feat(Settings): add helpers to get version number of bot 2024-07-13 22:24:07 -04:00
anthorob f3d11a5f98 Changed properties name and update build process 2024-07-11 21:07:47 -04:00
anthorob f51ae465bd change how properties file is loaded and rely on environment variables if it doesn't exist 2024-07-10 20:28:28 -04:00
anthorob 7b2098a27d Udio: fix wrong artwork url 2024-06-28 20:49:02 -04:00
anthorob b392d892ad Udio: fix json extraction from updated webpage and add artwork url to audio track 2024-06-26 00:05:07 -04:00