-
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
Kdoc the Kord #729
Kdoc the Kord #729
Conversation
I think for classes that only are 1:1 mappings of discord json models (like most things in |
Sounds good, I'll change my documenting style to that from now on |
core/src/main/kotlin/event/channel/thread/ThreadListSyncEvent.kt
Outdated
Show resolved
Hide resolved
# Conflicts: # core/src/main/kotlin/event/channel/TypingStartEvent.kt # core/src/main/kotlin/event/message/MessageBulkDeleteEvent.kt # core/src/main/kotlin/event/message/MessageDeleteEvent.kt # core/src/main/kotlin/event/message/ReactionAddEvent.kt # core/src/main/kotlin/event/message/ReactionRemoveAllEvent.kt # core/src/main/kotlin/event/message/ReactionRemoveEvent.kt
# Conflicts: # core/src/commonMain/kotlin/builder/kord/KordBuilder.kt # core/src/commonMain/kotlin/entity/Webhook.kt # core/src/commonMain/kotlin/event/channel/ChannelCreateEvent.kt # core/src/commonMain/kotlin/event/channel/ChannelDeleteEvent.kt # core/src/commonMain/kotlin/event/channel/ChannelUpdateEvent.kt # core/src/commonMain/kotlin/exception/EntityNotFoundException.kt
# Conflicts: # core/src/commonMain/kotlin/entity/Guild.kt # core/src/commonMain/kotlin/entity/Icon.kt # core/src/commonMain/kotlin/entity/PartialGuild.kt # core/src/commonMain/kotlin/entity/Role.kt # core/src/commonMain/kotlin/entity/Sticker.kt # core/src/commonMain/kotlin/entity/User.kt # core/src/commonMain/kotlin/event/channel/thread/ThreadListSyncEvent.kt # core/src/commonMain/kotlin/event/gateway/Events.kt # core/src/commonMain/kotlin/event/message/MessageBulkDeleteEvent.kt # core/src/commonMain/kotlin/event/message/MessageDeleteEvent.kt # core/src/commonMain/kotlin/event/message/ReactionAddEvent.kt # core/src/commonMain/kotlin/event/message/ReactionRemoveAllEvent.kt # core/src/commonMain/kotlin/event/message/ReactionRemoveEvent.kt
…ing now" This reverts commit bf3f1ff.
I was recently thinking... there's many undocumented classes, specially And then I found this 😬 |
Yeah this PR is quite old now, I need to split it down into smaller ones to reduce the size of the PR required. Thanks for reminding me I can do this now :) |
Yeah I was interested in doing this, but I think it would be better if I wait for this to be merged so I could check whatever was left missing (or added later). Glad I decided to do a search before starting 😅 |
Haha yeah, I'm currently bringing the PR up to date and will then make some smaller PRs to make it easier :) |
# Conflicts: # core/src/commonMain/kotlin/entity/Icon.kt # core/src/commonMain/kotlin/entity/Member.kt # core/src/commonMain/kotlin/entity/User.kt # core/src/commonMain/kotlin/event/channel/thread/ThreadListSyncEvent.kt # core/src/commonMain/kotlin/event/interaction/ApplicationCommandCreate.kt # core/src/commonMain/kotlin/event/interaction/ApplicationCommandDelete.kt # core/src/commonMain/kotlin/event/interaction/ApplicationCommandUpdate.kt # core/src/commonMain/kotlin/event/message/ReactionAddEvent.kt
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.
Some small typos and suggestions.
@@ -99,9 +102,15 @@ public class Kord( | |||
|
|||
override val coroutineContext: CoroutineContext = SupervisorJob() + dispatcher | |||
|
|||
/** | |||
* Returns a [Flow] of [Region]s know to the bot. |
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.
know -> known
Line 112 too
public fun autoModerationRule(guildId: Snowflake, ruleId: Snowflake): AutoModerationRuleBehavior = | ||
AutoModerationRuleBehaviorImpl(guildId, ruleId, kord) | ||
|
||
/** | ||
* Returns an [KeywordAutoModerationRuleBehavior] for a given [guildId]. |
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.
article: an -> a
@@ -140,6 +142,9 @@ public open class Invite( | |||
/** | |||
* An instance of a [Discord Invite](https://discord.com/developers/docs/resources/invite) with | |||
* [extra information](https://discord.com/developers/docs/resources/invite#invite-metadata-object). | |||
* | |||
* @param kord The Kord instance that created this object | |||
* @param supplier THe supplier used to request entities |
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.
THe -> The
@@ -11,20 +11,30 @@ import dev.kord.core.exception.EntityNotFoundException | |||
import dev.kord.core.supplier.EntitySupplier | |||
import dev.kord.core.supplier.EntitySupplyStrategy | |||
|
|||
/** | |||
* Represents a user's current state on a guild. |
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.
I think "current status" would be more appropiate.
@@ -15,8 +15,14 @@ import dev.kord.gateway.GatewayCloseCode | |||
import kotlinx.coroutines.flow.Flow | |||
import kotlinx.coroutines.flow.filter | |||
|
|||
/** | |||
* A Gateway recieved an event. |
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.
recieved -> received
* 2. When a Guild becomes available again to the client | ||
* 3. When the current user joins a new Guild. | ||
* | ||
* _Scenarios 1 and 3 may be marked unavailable during an outage_ |
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.
While this is true, kord does not support this unavailable
flag in this event, so that should be noted here until it is implemented.
@@ -131,37 +133,37 @@ public class InviteCreateEvent( | |||
* Requests to get the [Channel] this invite is for. | |||
* | |||
* @throws [RequestException] if anything went wrong during the request. | |||
* @throws [EntityNotFoundException] if the wasn't present. | |||
* @throws [EntityNotFoundException] if the wasn't present. |
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.
missing word here: if the channel wasn't present.
@@ -4,6 +4,13 @@ import dev.kord.core.Kord | |||
import dev.kord.core.entity.application.* | |||
import dev.kord.core.event.Event | |||
|
|||
/** | |||
* The event dispatched when an [GuildApplicationCommand] is updated. |
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.
article: an -> a
Damn it, I thought I was looking at the new PR 😭 |
This PR aims to close #11 or at least tackle the main part of it, by documenting lots and lots of code :D
Anyone who wants to help is welcome to PR to this branch and hopefully we can document as much as possible.
This will remain as a draft for a long time most likely
Any
private
orinternal
classes/functions/variables will not be documented in this PRWhat has been documented?
Below is a list of the "parent packages" in each of Kords modules, this is how i categorize the completion of this PR.
These will be checked once complete
Common
Core
Rest
Voice