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

Fix FlatMapRestAction predicate with complete or submit #2636

Merged
merged 3 commits into from
Mar 30, 2024
Merged

Fix FlatMapRestAction predicate with complete or submit #2636

merged 3 commits into from
Mar 30, 2024

Conversation

Whizyyy
Copy link
Contributor

@Whizyyy Whizyyy commented Mar 26, 2024

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: #2635

Description

This make sure the predicate of FlatMapRestAction is considered with complete or submit.

…rator/FlatMapRestAction.java

Co-authored-by: Florian Spieß <[email protected]>
Copy link
Member

@MinnDevelopment MinnDevelopment left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@MinnDevelopment MinnDevelopment merged commit e7bafe9 into discord-jda:master Mar 30, 2024
1 check passed
@Whizyyy Whizyyy deleted the fix/restaction-flatmap branch April 3, 2024 11:54
mergify bot referenced this pull request in SvenKirschbaum/musikbot-client Apr 6, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|---|---|
| maven | stage | digest | `2b884f2` -> `3a69a5d` |  |  |  |  |
| rust | stage | patch | `1.77.0-bookworm` -> `1.77.1-bookworm` | [![age](https://developer.mend.io/api/mc/badges/age/docker/rust/1.77.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/docker/rust/1.77.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/docker/rust/1.77.0/1.77.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/docker/rust/1.77.0/1.77.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) |
| [net.dv8tion:JDA](https://togithub.com/DV8FromTheWorld/JDA) | compile | patch | `5.0.0-beta.21` -> `5.0.0-beta.22` | [![age](https://developer.mend.io/api/mc/badges/age/maven/net.dv8tion:JDA/5.0.0-beta.22?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/net.dv8tion:JDA/5.0.0-beta.22?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/net.dv8tion:JDA/5.0.0-beta.21/5.0.0-beta.22?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/net.dv8tion:JDA/5.0.0-beta.21/5.0.0-beta.22?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>DV8FromTheWorld/JDA (net.dv8tion:JDA)</summary>

### [`v5.0.0-beta.22`](https://togithub.com/discord-jda/JDA/releases/tag/v5.0.0-beta.22): | Bulk ban, premium apps, bug fixes

### Overview

This release adds some newer API features, like premium app subscriptions, bot banners, and bulk banning users.

Besides new features, this release also includes improved errors and bug fixes.

##### Premium App Subscriptions ([#&#8203;2583](https://togithub.com/DV8FromTheWorld/JDA/issues/2583))

If your bot is eligible for monetization, you can now use JDA to handle [**entitlements**](https://docs.jda.wiki/net/dv8tion/jda/api/interactions/Interaction.html#getEntitlements\(\)) in interactions to restrict features. With [`event.replyWithPremiumRequired()`](https://docs.jda.wiki/net/dv8tion/jda/api/interactions/callbacks/IPremiumRequiredReplyCallback.html#replyWithPremiumRequired\(\)), you can upsell a premium subscription to a user:

![b306d1ccc7205d2291f4535f912a790e](https://togithub.com/discord-jda/JDA/assets/18090140/61197d9f-b900-4259-9722-c4a357960482)

Read more about entitlements and premium app subscriptions in the [Discord Developer Docs](https://discord.com/developers/docs/monetization/app-subscriptions).

##### Bulk Ban ([#&#8203;2630](https://togithub.com/DV8FromTheWorld/JDA/issues/2630))

You can now ban up to 200 users in one request using [`guild.ban(users, messageDeleteTimeframe)`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/Guild.html#ban\(java.util.Collection,java.time.Duration\)).

This endpoint has a few quirks to keep in mind:

-   The [BulkBanResponse](https://docs.jda.wiki/net/dv8tion/jda/api/entities/BulkBanResponse.html) includes **failed users** and **banned users**
-   If a user was already banned, they are in the **failed users**
-   If you don't have permissions to ban a user (higher role / owner), they also appear in **failed users**
-   The self user also appears in **failed users**
-   If all users "failed" you get an error response instead

#### New Features

-   Add support for bulk banning users by [@&#8203;MinnDevelopment](https://togithub.com/MinnDevelopment) in [https://github.com/discord-jda/JDA/pull/2630](https://togithub.com/discord-jda/JDA/pull/2630)
-   Add the ability to set the bot banner by [@&#8203;freya022](https://togithub.com/freya022) in [https://github.com/discord-jda/JDA/pull/2629](https://togithub.com/discord-jda/JDA/pull/2629)
-   Add support for premium app subscriptions by [@&#8203;Giuliopime](https://togithub.com/Giuliopime) in [https://github.com/discord-jda/JDA/pull/2583](https://togithub.com/discord-jda/JDA/pull/2583)

#### Changes

-   Create an exception when receiving UNKNOWN_WEBHOOK in interaction hooks by [@&#8203;freya022](https://togithub.com/freya022) in [https://github.com/discord-jda/JDA/pull/2621](https://togithub.com/discord-jda/JDA/pull/2621)

#### Bug Fixes

-   Fix format specifiers when adding invalid choices by [@&#8203;freya022](https://togithub.com/freya022) in [https://github.com/discord-jda/JDA/pull/2628](https://togithub.com/discord-jda/JDA/pull/2628)
-   Fix FlatMapRestAction predicate with complete or submit by [@&#8203;Whizyyy](https://togithub.com/Whizyyy) in [https://github.com/discord-jda/JDA/pull/2636](https://togithub.com/discord-jda/JDA/pull/2636)
-   Handle numeric keys for ETF maps by [@&#8203;MinnDevelopment](https://togithub.com/MinnDevelopment) in [https://github.com/discord-jda/JDA/pull/2642](https://togithub.com/discord-jda/JDA/pull/2642)

**Full Changelog**: discord-jda/JDA@v5.0.0-beta.21...v5.0.0-beta.22

### Installation

#### Gradle

```gradle
repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.0.0-beta.22")
}
```

#### Maven

```xml
<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.22</version> 
</dependency>
```

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on sunday" in timezone Europe/Berlin, 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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/SvenKirschbaum/musikbot-client).
BachErik referenced this pull request in BachErik/Hypixel-Stats-generator Apr 7, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [net.dv8tion:JDA](https://togithub.com/DV8FromTheWorld/JDA) |
`5.0.0-beta.21` -> `5.0.0-beta.22` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/net.dv8tion:JDA/5.0.0-beta.22?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/net.dv8tion:JDA/5.0.0-beta.22?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/net.dv8tion:JDA/5.0.0-beta.21/5.0.0-beta.22?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/net.dv8tion:JDA/5.0.0-beta.21/5.0.0-beta.22?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>DV8FromTheWorld/JDA (net.dv8tion:JDA)</summary>

###
[`v5.0.0-beta.22`](https://togithub.com/discord-jda/JDA/releases/tag/v5.0.0-beta.22):
| Bulk ban, premium apps, bug fixes

### Overview

This release adds some newer API features, like premium app
subscriptions, bot banners, and bulk banning users.

Besides new features, this release also includes improved errors and bug
fixes.

##### Premium App Subscriptions
([#&#8203;2583](https://togithub.com/DV8FromTheWorld/JDA/issues/2583))

If your bot is eligible for monetization, you can now use JDA to handle
[**entitlements**](https://docs.jda.wiki/net/dv8tion/jda/api/interactions/Interaction.html#getEntitlements\(\))
in interactions to restrict features. With
[`event.replyWithPremiumRequired()`](https://docs.jda.wiki/net/dv8tion/jda/api/interactions/callbacks/IPremiumRequiredReplyCallback.html#replyWithPremiumRequired\(\)),
you can upsell a premium subscription to a user:


![b306d1ccc7205d2291f4535f912a790e](https://togithub.com/discord-jda/JDA/assets/18090140/61197d9f-b900-4259-9722-c4a357960482)

Read more about entitlements and premium app subscriptions in the
[Discord Developer
Docs](https://discord.com/developers/docs/monetization/app-subscriptions).

##### Bulk Ban
([#&#8203;2630](https://togithub.com/DV8FromTheWorld/JDA/issues/2630))

You can now ban up to 200 users in one request using [`guild.ban(users,
messageDeleteTimeframe)`](https://docs.jda.wiki/net/dv8tion/jda/api/entities/Guild.html#ban\(java.util.Collection,java.time.Duration\)).

This endpoint has a few quirks to keep in mind:

- The
[BulkBanResponse](https://docs.jda.wiki/net/dv8tion/jda/api/entities/BulkBanResponse.html)
includes **failed users** and **banned users**
-   If a user was already banned, they are in the **failed users**
- If you don't have permissions to ban a user (higher role / owner),
they also appear in **failed users**
-   The self user also appears in **failed users**
-   If all users "failed" you get an error response instead

#### New Features

- Add support for bulk banning users by
[@&#8203;MinnDevelopment](https://togithub.com/MinnDevelopment) in
[https://github.com/discord-jda/JDA/pull/2630](https://togithub.com/discord-jda/JDA/pull/2630)
- Add the ability to set the bot banner by
[@&#8203;freya022](https://togithub.com/freya022) in
[https://github.com/discord-jda/JDA/pull/2629](https://togithub.com/discord-jda/JDA/pull/2629)
- Add support for premium app subscriptions by
[@&#8203;Giuliopime](https://togithub.com/Giuliopime) in
[https://github.com/discord-jda/JDA/pull/2583](https://togithub.com/discord-jda/JDA/pull/2583)

#### Changes

- Create an exception when receiving UNKNOWN_WEBHOOK in interaction
hooks by [@&#8203;freya022](https://togithub.com/freya022) in
[https://github.com/discord-jda/JDA/pull/2621](https://togithub.com/discord-jda/JDA/pull/2621)

#### Bug Fixes

- Fix format specifiers when adding invalid choices by
[@&#8203;freya022](https://togithub.com/freya022) in
[https://github.com/discord-jda/JDA/pull/2628](https://togithub.com/discord-jda/JDA/pull/2628)
- Fix FlatMapRestAction predicate with complete or submit by
[@&#8203;Whizyyy](https://togithub.com/Whizyyy) in
[https://github.com/discord-jda/JDA/pull/2636](https://togithub.com/discord-jda/JDA/pull/2636)
- Handle numeric keys for ETF maps by
[@&#8203;MinnDevelopment](https://togithub.com/MinnDevelopment) in
[https://github.com/discord-jda/JDA/pull/2642](https://togithub.com/discord-jda/JDA/pull/2642)

**Full Changelog**:
discord-jda/JDA@v5.0.0-beta.21...v5.0.0-beta.22

### Installation

#### Gradle

```gradle
repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.0.0-beta.22")
}
```

#### Maven

```xml
<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-beta.22</version> 
</dependency>
```

</details>

---

### 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.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/BachErik/Hypixel-Stats-generator).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants