Skip to content

Merge extended XML documentation. - #389

Open
Red-K0 wants to merge 3 commits into
NetCordDev:mainfrom
Red-K0:alpha
Open

Merge extended XML documentation.#389
Red-K0 wants to merge 3 commits into
NetCordDev:mainfrom
Red-K0:alpha

Conversation

@Red-K0

@Red-K0 Red-K0 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Red-K0 added 2 commits July 12, 2026 01:58
- Added significant amounts of documentation to RestClient, channel and message types, and more.
- Added some missing / newly-added properties and JSON objects.
- Renamed certain flag values for more consistent styling.
- Obsoleted certain deprecated properties.
- Added some missing flags.
@github-actions

Copy link
Copy Markdown

The documentation preview is available at https://preview.netcord.dev/389.

@KubaZ2 KubaZ2 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for this huge PR! For now I reviewed everything up to UserActivityFlags.

Comment thread NetCord/Channels/TextChannels/Guild/Threads/AnnouncementGuildThread.cs Outdated
Comment thread NetCord/Channels/TextChannels/Guild/Threads/ForumGuildThread.cs
Comment thread NetCord/Channels/TextChannels/Guild/Threads/GuildThread.cs Outdated
public GuildThreadMetadata Metadata { get; }

/// <summary>
/// A minimal <see cref="ThreadUser"/> for the current user, if they have joined the thread.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this is confusing, is says it is "minimal" ThreadUser but in fact it is just ThreadCurrentUser. Maybe it would be better not to mention ThreadUser at all and just say "A minimal thread user for the current user, if they have joined the thread."?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why was this marked as resolved?

Comment thread NetCord/Channels/TextChannels/Guild/Threads/UnknownGuildThread.cs Outdated

namespace NetCord;

/// <inheritdoc cref="IVoiceGuildChannel"/>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It is not the same. VoiceGuildChannel in the classic voice channel. StageGuildChannel is also an IVoiceGuildChannel but it is not a VoiceGuildChannel. I think maybe the xml doc from IVoiceGuildChannel matches VoiceGuildChannel and IVoiceGuildChannel should have a separate xml doc explaining that it is a generic channel type?

@Red-K0 Red-K0 Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it makes sense as it is. A VoiceGuildChannel is directly an IVoiceGuildChannel, just not sub-specified into any other voice channel type.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

VoiceGuildChannel is a specific channel type. There are VoiceGuildChannel and StageGuildChannel, both inherit after IVoiceGuildChannel. I think there should at least be something indicating that it is the standard voice channel. I think the current doc will be confusing, because people won't know IVoiceGuildChannel may be a stage channel.

Comment thread NetCord/Channels/IInteractionChannel.cs Outdated
Comment thread NetCord/Channels/UnknownChannel.cs Outdated
Comment thread NetCord/Channels/UnknownGuildChannel.cs Outdated
Comment thread NetCord/Gateway/UserActivityFlags.cs Outdated
Comment on lines +22 to +23
[JsonPropertyName("create_timestamp")]
public DateTimeOffset? CreateTimestamp { get; set; }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not sure this makes sense. Thread create timestamp can be easily retrieved from its ID I believe. Also I think NetCord uses a convention so that it should be named CreatedAt if we really want to introduce this.

[JsonPropertyName("team_id")]
public ulong TeamId { get; set; }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change

Comment thread NetCord/BaseTheme.cs
/// <summary>
/// Specifies a <see cref="SharedClientTheme"/>'s base theme.
/// </summary>
public enum BaseTheme : byte

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think just BaseTheme is too vague. Maybe something like this?

Suggested change
public enum BaseTheme : byte
public enum SharedClientThemeBase : byte


/// <summary>
/// Name of the upload.
/// The filename to use for the upload.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is misleading. Uploaded file name is like the key or the ID of a file to send.

Comment on lines 62 to 64
public virtual bool SupportsHttpSerialization => true;

public virtual HttpContent Serialize() => new StreamContent(GetStream()!);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think these symbols should also have xml docs

Comment on lines 44 to 50
protected Stream? GetStream()
{
if (Interlocked.Exchange(ref _read, 1) is 1)
ThrowAttachmentAlreadySent();

return _stream;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This symbol should also have xml docs


/// <summary>
/// Timestamp of the embed.
/// Displays time in a format similar to a message timestamp. Located next to the <see cref="Footer"/>.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe something like this? I mean the case that an embed may have a timestamp but no footer.

Suggested change
/// Displays time in a format similar to a message timestamp. Located next to the <see cref="Footer"/>.
/// Displays time in a format similar to a message timestamp. Located next to the <see cref="Footer"/>, if set.

/// <summary>
/// The thread user's <see cref="PartialGuildUser"/> object.
/// </summary>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants