twonirwana / DiscordDiceBot

A dice rolling bot for Discord, that uses buttons and provides image for the rolled dice.
GNU Affero General Public License v3.0
31 stars 7 forks source link

Bump net.dv8tion:JDA from 5.1.1 to 5.1.2 #589

Closed dependabot[bot] closed 2 weeks ago

dependabot[bot] commented 2 weeks ago

Bumps net.dv8tion:JDA from 5.1.1 to 5.1.2.

Release notes

Sourced from net.dv8tion:JDA's releases.

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: https://github.com/discord-jda/JDA/compare/v5.1.1...v5.1.2

... (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 show ignore conditions` will show all of the ignore conditions of the specified dependency - `@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)
codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 69.90%. Comparing base (9e6bf96) to head (ec95c6d).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #589 +/- ## ========================================= Coverage 69.90% 69.90% Complexity 1117 1117 ========================================= Files 103 103 Lines 5314 5314 Branches 531 531 ========================================= Hits 3715 3715 Misses 1209 1209 Partials 390 390 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.