-
Notifications
You must be signed in to change notification settings - Fork 82
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
Merge 0.8.x into model-fixes, nullable limits #517
Merged
Merged
Conversation
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
…l contracts everywhere (kordlib#471) * Remove no longer necessary experimental annotations * Move top-level test json.MessageTest.`User serialization` into class and make it pass * Move top-level tests in EmojiTest.kt into class json.EmojiTest and make them pass * Move top-level tests in GuildTest.kt into class json.GuildTest and make them pass * Opt-in to experimental contracts for all modules
Add limit to AuditLogGetRequestBuilder
Fix bug causing role PermissionOverwrites being added for members
* Fix collection in 1.6.0 * revamp message sticker model * Add sticker endpoints and services * Add core representation for Stickers * implement suppliers for stickers and cache * allow Stickers to be have a strategy * Introduce a GuildSticker with behavior * Fix compiler errors * Fix compiler errors, again * Fix modeling of description to packId
* Remove duplicate link in all doc comments. * Add, fix, remove duplicates * Preserve binary compatibility for JsonErrorCode
* Fix encoding Authorization header * Fix wrong header in KordBuilder
Add support for Interaction localization
…tion type, multiple fixes (kordlib#484) * Fix AuditLogGetRequestBuilder docs * AuditLogGetRequestBuilder.limit is 50 by default * Better types in pagination * Always use service getters in RestEntitySupplier * Default limit for getCurrentUserGuilds, see https://discord.com/developers/docs/resources/user#get-current-user-guilds * Add checkLimitAndGetBatchSize function * Add limitPagination function * RestEntitySupplier.getMessagesAround did not use limit parameter * Max limit/batchSize for RestEntitySupplier.guilds, see https://discord.com/developers/docs/resources/user#get-current-user-guilds * Use more specific position types where possible * Fixes for archived threads * Lambdas for guilds idSelector * Fix pagination for audit log * Higher order function for limited pagination * unexpected bigger page will not stop pagination * batchSize as first param in pagination * Make sure Position.Around can not be used in UserService.getCurrentUserGuilds * Nullable limit and position parameters to use Discord's defaults * Clearer names in pagination * Cannot paginate nullable items * Clarify no maxBatchSize documented * Move map one more level in RestEntitySupplier.getJoinedPrivateArchivedThreads() * idLt for consistency
* Fix issue with auto-complete serialization * Fix compiler error * Add requested changes - Add missing instance check - Clarify docs
* Add error code 50086, see discord/discord-api-docs@a833b5c * Remove unnecessary overrides in EntitySuppliers, toString for StoreEntitySupplier * Remove unused param in modifyInteractionResponse() * Data class where appropriate * No data class for builders * . * Document RequestException instead of RestRequestException
Co-authored-by: Lukellmann <[email protected]>
Co-authored-by: Lukellmann <[email protected]>
Fix both ci triggers skipping
…GatwayResponse (kordlib#489) * No shards field on GatewayResponse * Fix authentication header requirements * inline shorthands in suppliers * reason null by default everywhere
* Added missing properties for attachments. * Use nullable types instead of Optional in Attachment.kt. Signed-off-by: bvanseg <[email protected]>
* fix bug when choices never get set The `.choices` call returns a `MutableList<Choice<*>>?`, which causes the line in question to throw an error if it's null (the default given that it's a delegate call with the default being `Optional.Missing`) * remove cast Co-authored-by: Lukellmann <[email protected]>
) * Remove no longer necessary experimental annotations * Move top-level test json.MessageTest.`User serialization` into class and make it pass * Move top-level tests in EmojiTest.kt into class json.EmojiTest and make them pass * Move top-level tests in GuildTest.kt into class json.GuildTest and make them pass * Opt-in to experimental contracts for all modules * explicitApi for all modules * explicitApi for Color * explicitApi for Annotations * explicitApi for AuditLog * explicitApi for RateLimiter * explicitApi for DiscordPinsUpdateData and DiscordTyping * explicitApi for DiscordActivity * explicitApi for DiscordBitSet * explicitApi for DiscordChannel * explicitApi for DiscordComponent * explicitApi for DiscordConnection * explicitApi for DiscordEmoji * explicitApi for DiscordGuild * explicitApi for DiscordGuildScheduledEvent and DiscordGuildWidget * explicitApi for DiscordIntegration * explicitApi for DiscordInvite * explicitApi for DiscordMessage * explicitApi for DiscordNull and DiscordRole * explicitApi for DiscordSelectOption, DiscordShard and DiscordStageInstance * explicitApi for DiscordTemplate and DiscordTimestamp * explicitApi for DiscordUser * explicitApi for DiscordWebhook * explicitApi for Interactions * explicitApi for Invite and Member * explicitApi for Optional * explicitApi for Optional * explicitApi for OptionalDelegates * explicitApi for OptionalInt * explicitApi for OptionalLong * explicitApi for OptionalSnowflake * explicitApi for Permission * explicitApi for Presence * explicitApi for RequestException * explicitApi for Snowflake * explicitApi for Team * explicitApi for Command * explicitApi for RateLimiter * explicitApi for ActionRowBuilder * explicitApi for AllowedMentionsBuilder * explicitApi for MessageCreateBuilders * explicitApi for AuditLogGetRequestBuilder * explicitApi for GatewayConfiguration * explicitApi for Gateway * explicitApi for GuildChannelPositionModifyBuilder * explicitApi for GuildRequests * explicitApi for OptionsBuilder * explicitApi for KtorRequestHandler * explicitApi for RequestBuilder * explicitApi for RestClient / RestService * explicitApi for RoleCreateBuilder * explicitApi for Event * explicitApi for ApplicationCommandBuilders * explicitApi for ApplicationInfoResponse, ApplicationService, AuditLogGetRequest and AuditLogService * explicitApi for BanCreateBuilder, BanResponse * explicitApi for ButtonBuilder * explicitApi for CategoryCreateBuilder, CategoryModifyBuilder * explicitApi for CdnUrl, Channel, ChannelFollowRequest, ChannelPermissionModifyBuilder and ChannelRequests * explicitApi for ChannelService * explicitApi for HttpUtils * explicitApi for ComponentBuilders * explicitApi for Connection, CurrentUserModifyBuilder and CurrentUserNicknameModifyResponse * explicitApi for DiscordCdn * explicitApi for DiscordErrorResponse and EditGuildChannelBuilder * explicitApi for EmbedBuilder and EmbedResponse * explicitApi for EmojiCreateBuilder, EmojiModifyBuilder, EmojiRequests and EmojiService * explicitApi for FollowedChannelResponse, FollowupMessageModifyBuilder and Gateway * explicitApi for FollowedChannelResponse, FollowupMessageModifyBuilder and Gateway * explicitApi for GuildModifyBuilder * explicitApi for GuildService * explicitApi for Image * explicitApi for InputChatBuilders * explicitApi for IntegrationModifyBuilder and InteractionResponseModifyBuilder * explicitApi for Intent * explicitApi for InteractionService * explicitApi for InteractionsRequests * explicitApi for InviteCreateBuilder, InviteCreateRequest and InviteService * add new error codes and explicitApi for JsonErrorCode * explicitApi for Retry and LinearRetry * explicitApi for LoginBuilder * explicitApi for MemberAddBuilder and MemberModifyBuilder * explicitApi for MessageCommandBuilders * explicitApi for MessageModifyBuilder, UserMessageModifyBuilder and WebhookMessageModifyBuilder * explicitApi for MessageRequests * explicitApi for MultiApplicationCommandBuilder * explicitApi for NamedFile * explicitApi for NewsChannelCreateBuilder * explicitApi for OpCode * explicitApi for PermissionOverwriteBuilder, PermissionOverwritesBuilder, TextChannelCreateBuilder and VoiceChannelCreateBuilder * explicitApi for Position, PresenceBuilder and Prune * explicitApi for Request * explicitApi for RequestBuilder * explicitApi for RequestHandler and RestRequestException * explicitApi for Route * move companion object, Key class and NoStrategy up in Route.kt for better overview * Group routes similar to docs * explicitApi for RequestGuildMembersBuilder * explicitApi for RoleModifyBuilder and RolePositionsModifyBuilder * explicitApi for ScheduledEventCreateBuilder, ScheduledEventModifyBuilder and ScheduledEventRequests * explicitApi for SelectOptionBuilder * explicitApi for StageInstanceRequests and StageInstanceService.kt * explicitApi for StartThreadBuilder and StartThreadWithMessageBuilder * explicitApi for TemplateBuilders, TemplateRequests and TemplateService * explicitApi for ThreadModifyBuilder, Ticker and UserCommandBuilders * explicitApi for UserRequests and UserService * explicitApi for VoiceService, VoiceStateModifyBuilder and VoiceStateRequests * explicitApi for WidgetModifyBuilder * remove unnecessary constructor keywords * explicitApi for WebhookCreateBuilder, WebhookModifyBuilder, WebhookRequests, WebhookService and WelcomeScreenModifyBuilder * * fix ExceptionInInitializerError in AuditLogChangeKey.Serializer caused by Color.Companion being private * make OpCodes serializer non-companion * revert change in NotSerializable * Interactions models as data classes * public (De-)SerializationStrategies * DiscordClose as data class * no data class for UrlFormatBuilder * Restore explicit api after merge * Revert "add new error codes and explicitApi for JsonErrorCode" This reverts commit 75da90e. * explicitApi for JsonErrorCode after revert (changes in kordlib#482 instead) * Revert making serializers internal (will be in future PR) * Forgot some * Remove unused logger * Restore explicit api after merge * Restore public api after merge * restore shards field for GatewayResponse, fixed in other PR * Restore explicit api after merge * Restore explicit api after merge * SelectMenuComponent.disabled doc * Locale doc * Restore explicit api after merge * Revert "Remove unused logger" This reverts commit 87915e4. * typo Co-authored-by: Hope <[email protected]>
* Add InteractionCreateEvent to LiveMessage * Add MessageCommandInteractionCreateEvent to LiveMessage
* No shards field on GatewayResponse * Fix authentication header requirements * inline shorthands in suppliers * reason null by default everywhere * Add routes for webhooks and followup messages * Add endpoints in WebhookService * use createGlobalMessageCommandApplicationCommand in Kord * add getFollowupMessage() to InteractionService, rename createPublicInteractionResponse() * use builder from InteractionService in ActionInteractionBehavior * use builder from InteractionService in FollowupMessageBehavior * use builder from InteractionService in InteractionResponseBehavior * use builder from InteractionService in PublicFollowupMessageBehavior * add getFollowupMessageOrNull() and getFollowupMessage() * getFollowupMessage() in EntitySupplier * move withStrategy() to interfaces * get, edit and delete functions for webhook messages * Restore explicit api after merge * formatting * Rename InteractionFollowup to FollowupMessage and better typing for editing followups
* fix event models * audit log reason for creating and modifying events * remove no longer existing ScheduledEntityType.None * remove no longer existing field GuildScheduledEventEntityMetadata.speakerIds * var for all properties of ScheduledEventCreateBuilder * new GuildScheduledEventPrivacyLevel type * optional defaults
…for Threads (kordlib#491) * Deprecate Stage Discovery, see discord/discord-api-docs#3152, discord/discord-api-docs#4191 and discord/discord-api-docs#4296 * Add stickers to GuildPreview, see discord/discord-api-docs@5b023e0 * createTimestamp for Threads, see discord/discord-api-docs@53ee010
# Conflicts: # common/src/main/kotlin/entity/DiscordGuild.kt # core/src/main/kotlin/behavior/interaction/ActionInteractionBehavior.kt # core/src/main/kotlin/behavior/interaction/FollowupMessageBehavior.kt # core/src/main/kotlin/behavior/interaction/InteractionResponseBehavior.kt # core/src/main/kotlin/behavior/interaction/PublicFollowupMessageBehavior.kt # core/src/main/kotlin/cache/Query.kt # core/src/main/kotlin/supplier/CacheEntitySupplier.kt # core/src/main/kotlin/supplier/EntitySupplier.kt # core/src/main/kotlin/supplier/FallbackEntitySupplier.kt # core/src/main/kotlin/supplier/RestEntitySupplier.kt # core/src/test/kotlin/UtilKtTest.kt # rest/src/main/kotlin/json/request/GuildRequests.kt # rest/src/main/kotlin/route/Route.kt # rest/src/main/kotlin/service/ChannelService.kt # rest/src/main/kotlin/service/GuildService.kt # rest/src/main/kotlin/service/InteractionService.kt # voice/src/main/kotlin/gateway/Command.kt
For comparing 0.8.x with this after merge: 0.8.x...Lukellmann:model-fixes (the diffs and commits on this PR are kind of useless) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
5d9588b
84a6226
stickers
property intoGuildBehavior
, model-fixes intoGuild
-> conflicting types -> override withsuper
fallback88625d0
Kord.getInvite()
to non-nullable, take extra parametersKord.getInviteOrNull()
965e9df
GuildScheduledEventBehavior.members
8ded17a
getGuildScheduledEvent[Users|Members][After|Before]()
toget[Users|Members][After|Before]()
inGuildScheduledEventBehavior
before
/after
, use properties for that