ErdbeerbaerLP / DiscordIntegration-Core

Common module for the Discord Integration mod
https://modrinth.com/plugin/dcintegration
4 stars 21 forks source link

Bump net.dv8tion:JDA from 5.0.0-beta.3 to 5.0.0-beta.4 #118

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps net.dv8tion:JDA from 5.0.0-beta.3 to 5.0.0-beta.4.

Release notes

Sourced from net.dv8tion:JDA's releases.

v5.0.0-beta.4 | Audit Log Events and Silent Messages

Overview

This release adds support for recent Discord features, such as linked roles and silent messages. We also improved the user experience for shutting down, which should come in handy for anyone building reloadable plugins.

Add GuildAuditLogEntryCreateEvent (#2380)

Discord has finally introduced an event for new audit log entries. This can be used for keeping track of all kinds of moderation relevant activity in a guild. However, to receive this event you must have the View Audit Logs permission and enable the GUILD_MODERATION intent (formerly GUILD_BANS).

Silent Messages (#2392)

You can now send and receive messages which do not trigger desktop and mobile push notifications. This is done in the client by prefixing a message with @silent. In JDA you can use setSuppressedNotifications(true) to achieve the same. Note that @silent is not the correct way to create these messages with a bot, as it is a client only feature.

You can check the release pull request for more information: discord/discord-api-docs#5910

Await Shutdown (#2269)

The shutdown logic has adapted to allow more consistent behavior. We've introduced jda.awaitShutdown() as a way to allow blocking until all JDA subsystems reach completion. Note that this might take a long time, depending on how long your RestAction queue is at the time.

The recommended way to gracefully shutdown is to define a maximum wait threshold and use it to cancel requests after some time:

// Initating the shutdown, this closes the gateway connection and subsequently closes the requester queue
jda.shutdown();
// Allow at most 10 seconds for remaining requests to finish
if (!jda.awaitShutdown(Duration.ofSeconds(10))) { // returns true if shutdown is graceful, false if timeout exceeded
    jda.shutdownNow(); // Cancel all remaining requests, and stop thread-pools
    jda.awaitShutdown(); // Wait until shutdown is complete (indefinitely)
}

In order to save CPU time, we make use of conditional variables for all of our wait loops internally. This is much more efficient than using sleep polling, like suggested in the past.

New Features

Changes

Full Changelog: https://github.com/DV8FromTheWorld/JDA/compare/v5.0.0-beta.3...v5.0.0-beta.4

Installation

Gradle

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 1 year ago

Superseded by #123.