Throw IllegalStateException rather than NPE if the user tries to access a resource after the ScanResult has been closed (#885, thanks to @sebthom for reporting).
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.
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.
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 major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the dependencies group with 8 updates in the / directory:
4.8.176
4.8.177
1.5.8
1.5.12
2.17.2
2.18.0
2.17.2
2.18.0
2.17.2
2.18.0
2.17.2
2.18.0
v3-rev20240914-2.0.0
v3-rev20241014-2.0.0
5.1.1
5.1.2
Updates
io.github.classgraph:classgraph
from 4.8.176 to 4.8.177Release notes
Sourced from io.github.classgraph:classgraph's releases.
Commits
8841196
[maven-release-plugin] prepare release classgraph-4.8.177e5422fb
Reset version numbera138641
Fix previous commitdcd7ece
Don't allow resources to be opened after ScanResult is closed (#885)b61f6e0
[maven-release-plugin] prepare for next development iterationUpdates
ch.qos.logback:logback-classic
from 1.5.8 to 1.5.12Commits
3a64b51
prepare release 1.5.12ecae664
fix issues/87985968fa
logger call ends with two exceptions - fix issues/876ea3cec8
Update README.md887cbba
update README.mddf2a3b6
start work on 1.5.12-SNAPSHOT3aa0730
prepare release of version 1.5.118bcfd9a
allow for InsertFromJNDIModelHandler to be callable from logback-tyler75bee86
refactorings in support of logback-tyler8749edc
start work on 1.5.11-SNAPSHOTUpdates
com.fasterxml.jackson.core:jackson-databind
from 2.17.2 to 2.18.0Commits
Updates
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml
from 2.17.2 to 2.18.0Commits
13e4274
[maven-release-plugin] prepare release jackson-dataformats-text-2.18.0cd642d3
Prepare for 2.18.0 release4496d13
Add YAML test, too, for #4975b2415e
...3b9c691
Improve #497 test (to validate content)c86b438
Add failing test for #497 (#498)288eacc
Back to snapshot7d23986
[maven-release-plugin] prepare for next development iterationa36cf83
[maven-release-plugin] prepare release jackson-dataformats-text-2.18.0-rc1ee4e830
Prepare for 2.18.0-rc1Updates
com.fasterxml.jackson.datatype:jackson-datatype-guava
from 2.17.2 to 2.18.0Commits
e2cee41
[maven-release-plugin] prepare release jackson-datatypes-collections-2.18.02f3db97
Prepare for 2.18.0 release5ad9f42
Try to fix #160 (OSGi dep problem wrt Guava) (#161)f76649a
Bump actions/setup-java from 4.2.1 to 4.2.2 in the github-actions group (#159)021e87b
Back to snapshots9437e20
[maven-release-plugin] prepare for next development iterationccd538d
[maven-release-plugin] prepare release jackson-datatypes-collections-2.18.0-rc119c1046
Prepare for 2.18.0-rc1575cfdd
Update to 2.18.0-rc1-SNAPSHOT32f6a0f
Merge branch '2.17' into 2.18Updates
com.fasterxml.jackson.datatype:jackson-datatype-jsr310
from 2.17.2 to 2.18.0Updates
com.google.apis:google-api-services-drive
from v3-rev20240914-2.0.0 to v3-rev20241014-2.0.0Updates
net.dv8tion:JDA
from 5.1.1 to 5.1.2Release notes
Sourced from net.dv8tion:JDA's releases.
... (truncated)
Commits
5f799f1
Bump version to 5.1.22195954
Add github action for publishing (#2739)b036b20
Add support for message forwarding (#2744)e1188e7
Fix ScheduledEventManagerImpl::setStatus (#2743)77ec412
Support sending voice messages (#2738)8007014
Fix readme typo (#2724)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