[X] I have checked for similar issues on the Issue-tracker.
[X] I have checked for PRs that might already address this issue.
Version of JDA
5.0.0-beta.21
Expected Behaviour
JDA should verify the predicate and perform the function only if the predicate is verified.
The issue seems to happens when you are using RestAction#submit() but is working fine with RestAction#queue()
Code Example for Reproduction Steps
// The message here will not get deleted as the predicate always return false - This is expected.
channel.sendMessage("Hello World Queue!").flatMap(m -> false, Message::delete).queue();
// The message here will get deleted even if the predicate always return false - This is unexpected.
channel.sendMessage("Hello World Submit!").flatMap(m -> false, Message::delete).submit();
Code for JDABuilder or DefaultShardManagerBuilder used
General Troubleshooting
Version of JDA
5.0.0-beta.21
Expected Behaviour
JDA should verify the predicate and perform the function only if the predicate is verified.
The issue seems to happens when you are using RestAction#submit() but is working fine with RestAction#queue()
Code Example for Reproduction Steps
Code for JDABuilder or DefaultShardManagerBuilder used
Exception or Error