-
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
Implement forums #684
Implement forums #684
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First thoughts, haven't looked at everything yet.
import kotlin.contracts.InvocationKind | ||
import kotlin.contracts.contract | ||
|
||
public interface ForumChannelBehavior : ThreadParentChannelBehavior { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is missing an extension to create a thread, see here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied at #709
# Conflicts: # common/src/main/kotlin/entity/DiscordChannel.kt
# Conflicts: # common/src/main/kotlin/entity/DiscordChannel.kt # core/api/core.api # core/src/main/kotlin/entity/channel/Channel.kt
# Conflicts: # common/src/main/kotlin/entity/DiscordChannel.kt
* Add missing properties for create forum channel * api dump * add missing fields in the other builders * api dump * move flags to forum threads * apply suggestions * Small fixes Co-authored-by: Lukellmann <[email protected]>
# Conflicts: # common/build/generated/ksp/main/kotlin/dev/kord/common/entity/ChannelType.kt # core/api/core.api # core/src/main/kotlin/entity/channel/Channel.kt
# Conflicts: # rest/src/main/kotlin/json/JsonErrorCode.kt
* Message counts and position for channel and message * Api Dump * Is this dump better? * Update caches for message count and total message sent * Fix merge
# Conflicts: # common/api/common.api # core/api/core.api # core/src/main/kotlin/cache/data/MessageData.kt # core/src/main/kotlin/entity/Message.kt # rest/api/rest.api # rest/src/main/kotlin/builder/message/create/WebhookMessageCreateBuilder.kt # rest/src/main/kotlin/json/request/WebhookRequests.kt
* support for creating forum posts * api dump * support for uploading files on forum posts * more support to forums and forum threads * fix errors * maintain code consistency * add forum tag routes * Api Dump * Update Intent KDoc * Check for applied tags * Remove ForumChannelThread type * Move possible functions to ForumChannelBehavior * add applied tags to modify builder * Properly configure JVM auto-provisioning * Fix appliedTags mutability * Fix spacings * Final fixes --------- Co-authored-by: Luis <[email protected]> Co-authored-by: Lukellmann <[email protected]> Co-authored-by: hope <[email protected]> Co-authored-by: Michael Rittmeister <[email protected]>
relevant doc PRs:
ChannelType.GuildForum
ChannelFlag
+ChannelFlags
DiscordChannel.flags
andChannelData.flags
ThreadParentChannel
(keepactiveThreads
andgetPublicArchivedThreads()
) but noTopGuildMessageChannel
, however it also needs a new thread creation method, as it's different from both creating a thread from an existing message and without a message: threads created in forum channels always also create a message -> new builder that is a message create builder and a thread create builder, see https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channelThreadCreate
events to update cachedChannelData.lastMessageId
(same asMessageCreate
for normal message channels)(only the new
flags
fields indocs/resources/Channel.md
is relevant from this PR)WebhookExecuteRequest.threadName
andWebhookMessageCreateBuilder.threadName
DiscordChannel.totalMessageSent
andChannelData.totalMessageSent
-> also add on core thread channel typesDiscordMessge.position
,MessageData.position
,Message.position
messageCount
andtotalMessageSent
onMessageCreate
,MessageDelete
andMessageDeleteBulk
availableTags
,appliedTags
,defaultReactionEmoji
anddefaultThreadRateLimitPerUser
forDiscordChannel
,ChannelData
and on appropriate core channel typesavailableTags
,defaultReactionEmoji
anddefaultThreadRateLimitPerUser
for channel modify buildersChannelFlag.RequireTag
appliedTags
in builders for starting and modifying threads in forum channelsavailableTags
,defaultReactionEmoji
anddefaultThreadRateLimitPerUser
for channel create buildersSortOrderType
kord enumDiscordChannel.defaultSortOrder
andChannelData.defaultSortOrder
-> also add on core forum channel typedefaultSortOrder
in forum create / modify buildersname
is required discord/discord-api-docs#5458ForumLayoutType
kord enumDiscordChannel.defaultForumLayout
andChannelData.defaultForumLayout
-> also add on core forum channel typedefaultForumLayout
in builders