Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): Update dependency net.dv8tion:JDA to v5.1.2 #261

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 5, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
net.dv8tion:JDA 5.1.1 -> 5.1.2 age adoption passing confidence

Release Notes

discord-jda/JDA (net.dv8tion:JDA)

v5.1.2: | Message Forwarding and Voice Messages

Overview

This release adds support for new message features.

Forwarding messages (#​2744)

You can now handle forwarded messages using the new message snapshots.

@​Override
public void onMessageReceived(MessageReceivedEvent event) {
    MessageReference messageReference = event.getMessage().getMessageReference();
    // Forwarded messages have a reference of type FORWARD
    if (messageReference != null && messageReference.getType() == MessageReference.MessageReferenceType.FORWARD) {
        // The content of the forwarded message is provided as a snapshot
        MessageSnapshot snapshot = event.getMessage().getMessageSnapshots().getFirst();
        System.out.println("Received forwarded message with content: " + snapshot.getContentRaw());
    }
}

A bot can also forward a message using Message#fowardTo. Note that a forwarded message cannot contain any additional content.

Voice messages (#​2738)

You can now send voice messages with JDA, by utilizing the new FileUpload#asVoiceMessage method on your audio attachments.

channel.sendFiles(
  FileUpload.fromData(audioFile)
    .asVoiceMessage(MediaType.parse("audio/ogg"), waveform, 10.5) // 10.5 seconds audio/ogg message
).queue();

To create a voice message, you must first determine the audio media type of your voice message and sample a waveform up to 256 bytes. Voice messages require a valid audio/* media type like audio/ogg.

The waveform is used to render the voice message shape in the preview. It must not be an accurate sampling of the actual audio.

New Features

Bug Fixes

Full Changelog: discord-jda/JDA@v5.1.1...v5.1.2

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.1.2")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.1.2</version> 
</dependency>

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies For automated dependency updates label Oct 5, 2024
Copy link

github-actions bot commented Oct 5, 2024

test results

34 tests  ±0   34 ✅ ±0   1m 45s ⏱️ -6s
 9 suites ±0    0 💤 ±0 
 9 files   ±0    0 ❌ ±0 

Results for commit 29206e2. ± Comparison against base commit e45d3b4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies For automated dependency updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants