-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add a cache aware rest entity supplier (#338) * add a cahe aware rest supplier/strategy * abstract the new flow creation for storeAndEmit * apply suggestions * Reduce the number of iterations rename storeAndEmit to storeOnEach * update changelog * Fix master gateway average ping conversion (#337) * Change field visibility and single-expression return syntax (#335) * changed the visibility for the name, descript.. and type field, changed the toRequest functions to single expression-styled returns * remade .name and .description to public upon request, kept .type protected * remade .type into read only (val) * Implement select menus (#339) * Add select menu json representation * Add select menu builders * add serialization tests for select menu interactions * Add core implementation of select menus * Update ButtonComponent docs * Make SelectMenu min/max values a range * Fix getGuildBanOrNull recursion (#341) Fixes the self call in getGuildBanOrNull by delegating the call to the supplier instead * Make UpdateMessageInteractionResponseCreateBuilder fields nullable (#340) Makes the fields in the builder and request nullable where appropriate for updating a message * improve readme * api dump * add breaking changes to changelog * mention the type visibility change [ci skip] Co-authored-by: Bart Arys <[email protected]> Co-authored-by: Noak Palander <[email protected]>
- Loading branch information
1 parent
d81f061
commit df9ad86
Showing
29 changed files
with
1,242 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package dev.kord.common.entity | ||
|
||
import dev.kord.common.entity.optional.Optional | ||
import dev.kord.common.entity.optional.OptionalBoolean | ||
import kotlinx.serialization.Serializable | ||
|
||
/** | ||
* Represent a [select option structure](https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-option-structure). | ||
* | ||
* @param label the user-facing name of the option, max 25 characters | ||
* @param value the dev-define value of the option, max 100 characters | ||
* @param description an additional description of the option, max 50 characters | ||
* @param emoji the emoji to show in the option | ||
* @param default whether to render this option as selected by default | ||
*/ | ||
@Serializable | ||
class DiscordSelectOption( | ||
val label: String, | ||
val value: String, | ||
val description: Optional<String> = Optional.Missing(), | ||
val emoji: Optional<DiscordPartialEmoji> = Optional.Missing(), | ||
val default: OptionalBoolean = OptionalBoolean.Missing, | ||
) |
Oops, something went wrong.