Conversation
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Replace manual bootstrap with Quarkus CDI and `@QuarkusMain` in `Start.java` - Remove `EnvConfig.java` and use `application.properties` for configuration - Add `PaperTrailSdkBeanProvider.java` to produce SDK client beans Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Move default configuration values to `application.properties` - Update `BootstrapService.java` to check if proxy URL is blank instead of null Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Delete the deprecated `StackWalkerUtils.java` file - Remove obsolete comments referencing `StackWalkerUtils` in helper utility classes Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Add `@ApplicationScoped` and `@Inject` to listener classes - Replace manual `Executor` with `@RunOnVirtualThread` in `SelfKickListener` - Remove unused imports and comments Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Move helper classes from `listeners` to `service` package - Flatten listener packages by removing nested subdirectories - Update package declarations and imports across affected files - Delete obsolete `package-info.java` Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Merge helper classes into `AutoModerationService` - Move `AutoModUtils` to `utils.auditlog` package - Refactor `AuditLogListener` to use `@RunOnVirtualThread` and inject the new service Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Rename `AuditLogListener` to `AuditLogEventListener` - Extract the event parsing logic into a new `AuditLogEventHandler` class to improve maintainability and separate concerns Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Consolidate static helpers into `ModActionEventHandlerService` - Rename `AuditLogEventHandler` to `AuditLogEventHandlerDelegator` - Rename `AutoModerationService` to `AutoModerationEventHandlerService` to align naming Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Replace `AuditLogListener` with `AuditLogEntryEventListener` and `AbstractAuditLogEntryEventHandler` - Decouple event routing from handling to support multiple CDI-based handlers - Use `@RunOnVirtualThread` for virtual thread execution Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Rename `AbstractAuditLogEntryEventHandler` to `AuditLogEntryEventHandler` - Change visibility of `handleEvent` from package-private to `public` - Add detailed Javadocs explaining the multicast-style event routing Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Remove `@RunOnVirtualThread` and `@Blocking` annotations from `SelfKickListener.java` and `AuditLogEntryEventListener.java` - Clean up unused imports and Javadoc references to virtual threads Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Rename `AuditLogEntryEventListener` to `GuildAuditLogEntryEventListener` - Rename `AuditLogEntryEventHandler` to `GuildAuditLogEntryCreateEventHandler` - Remove `channelIdToSendTo` parameter and registration check Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- merge six helper classes into `AutoModEventHandler` - move `AutoModUtils` to the utility package Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- merge five helper classes into `ModActionEventHandler` Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Add Javadoc to `onUnknownEvent` and `onUnimplementedEvent` in `GuildAuditLogEntryCreateEventHandler.java` - Clarify the purpose of these handlers for unknown and unimplemented `ActionType`s Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- merge eight helper classes from channel subpackage into `ChannelEventHandler`, `ChannelOverrideEventHandler` and `VoiceChannelStatusEventHandler` - move `ChannelUtils` to the utility package (affects Thread helpers) Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- merge three helper classes from thread subpackage into `ThreadEventHandler` - move `ThreadUtils` to the utility package Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- merge three helper classes from thread subpackage into `RoleEventHandler` - move `RoleUtils` to the utility package Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- merge three helper classes from thread subpackage into `EmojiEventHandler` Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- merge three helper classes from thread subpackage into `StickerEventHandler` - move `StickerUtils` to the utility package Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Implement basic embed logging for prune events in `ModActionEventHandler.java` - Send a placeholder embed notification with an implementation notice when a prune event occurs Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- merge three helper classes from thread subpackage into `GuildUpdateEventHandler` - move `GuildUtils` to the utility package Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
…ndler - merge three helper classes from thread subpackage into `HomeSettingsEventHandler` Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- merge three helper classes from thread subpackage into `WebhookEventHandler` - move `WebhookUtils` to the utility package Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- merge three helper classes from thread subpackage into `IntegrationEventHandler` Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- merge two helper classes from thread subpackage into `InviteEventHandler` - move `InviteUtils` to the utility package Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
…dler - merge four helper classes from thread subpackage into `MemberStatusEventHandler` - move `MemberStatusUtils` to the utility package Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Specify the project as a Quarkus application - Enable Quarkus-specific build and packaging features Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Rename `papertrailbot-jar-with-dependencies.jar` to `papertrailbot-runner.jar` because of Quarkus Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Add `quarkus-smallrye-health` dependency to `pom.xml` - Implement `LivenessCheckController` for JDA shard health monitoring - Implement `ReadinessCheckController` to verify all JDA shards are connected - Configure `quarkus.http.port` in `application.properties` for health endpoints Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Externalize `quarkus.log.level` to use `LOG_LEVEL` environment variable Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
- Remove `quarkus.package.jar.type` property from `pom.xml` - Update `Dockerfile` to copy the `quarkus-app` directory - Adjust `Dockerfile` entrypoint to `bot/quarkus-run.jar` Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
Signed-off-by: Egg-03 <111327101+eggy03@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a big refactor that introduces Quarkus as a supporting framework for the bot. The main reason for including Quarkus was to use it's CDI called ArC. Additionally, SmallRye Health is also used to create custom healthcheck endpoints.
The changes, despite being big, are strictly internal and is fully compatible with v3.7.3 of the bot.
The following are some of the notable internal changes that has been included with the PR:
@ApplicationScopedbean and it's lifecycle is now managed by Quarkuslistenersandhandlers(previously known ashelpers). The listeners contain classes which extend JDA'sListenerAdapterand are dependent on the handler classes which process the events accordingly. Every listener class has been modified to strictly follow this style.AuditLogEventListenerhas received the biggest refactor. Known asGuildAuditLogEntryEventListener, it has an abstract handler classGuildAuditLogEntryCreateEventHandlerwhich provides overridable methods for eachActionTypefound in aGuildAuditLogEntryCreateEvent. Concrete implementations can override the methods for only the events they want to process. A final method in the abstract superclass takes care of routing the events fired, to appropriate overridden functions. See b29e4c0 and the provided javadocs to know more about this implementation. In short, this listener now has it's own event firing system like JDA's ListenerAdapter.BootstrapServicehas also received a major overhaul. The login process is now assisted by Quarkus via@PostConstructand logout, via@PreDestroy. Environment variable detection is now managed by Quarkus, instead of DotEnv. The service now exposes a builtShardManagerbean through a producer method, available within the container and injectable./q/health/liveandq/health/ready. These two check for the bot's connection to Discord and report in case there are connection issues. Aside from that, the pre-built/q/health/startedis also avalable.