Skip to content

Conversation

@OoLunar
Copy link
Contributor

@OoLunar OoLunar commented Apr 25, 2023

Summary

Splits the DSharpPlus.Rest project into multiple files, cleaning up code and adding some documentation.

Notes

Per usual, entirely untested. Requesting @inftord's review for incorrect/missing docs or parameters.

Copy link
Member

@inftord inftord left a comment

Choose a reason for hiding this comment

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

one small nitpick, but overall it's good

Copy link
Member

@akiraveliara akiraveliara left a comment

Choose a reason for hiding this comment

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

the formatting is very inconsistent, both with itself and with allman style. i've left comments on the most egregious violations i've caught, but i implore you to take a look over all of it - there's a fair few more.
i've also left a nitpick or two but those aren't super important

DefaultReaction? defaultReactionEmoji = null,
IEnumerable<DiscordForumTagBuilder>? availableTags = null,
DefaultSortOrder? defaultSortOrder = null
) => type switch
Copy link
Member

Choose a reason for hiding this comment

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

please put this in its own block, not an expression body

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The .editorconfig will cause a compiler warning, informing us to make it an expression. What is your proposed solution?

Copy link
Member

Choose a reason for hiding this comment

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

change it to only prefer expressions on single lines?

Optional<int> defaultPerUserRatelimit,
Optional<DefaultSortOrder?> defaultSortOrder,
Optional<DefaultForumLayout> defaultForumLayout
) => ApiClient.ModifyChannelAsync
Copy link
Member

Choose a reason for hiding this comment

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

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

x2

VerificationLevel? verificationLevel,
DefaultMessageNotifications? defaultMessageNotifications,
SystemChannelFlags? systemChannelFlags
) => ApiClient.CreateGuildAsync(name, regionId, iconBase64, verificationLevel, defaultMessageNotifications, systemChannelFlags);
Copy link
Member

Choose a reason for hiding this comment

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

formatting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

x2

Optional<ulong?> rulesChannelId,
Optional<SystemChannelFlags> systemChannelFlags,
string reason
) => ApiClient.ModifyGuildAsync(
Copy link
Member

Choose a reason for hiding this comment

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

as above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

x2

IEnumerable<DiscordRole> roles,
bool muted,
bool deafened
) => ApiClient.AddGuildMemberAsync(guildId, userId, accessToken, nick, roles, muted, deafened);
Copy link
Member

Choose a reason for hiding this comment

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

formatting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

x2

Optional<ulong?> voiceChannelId,
Optional<DateTimeOffset?> communicationDisabledUntil,
string reason
) => ApiClient.ModifyGuildMemberAsync(guildId, userId, nick, roleIds, mute, deaf, voiceChannelId, communicationDisabledUntil, reason);
Copy link
Member

Choose a reason for hiding this comment

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

formatting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

x2

string reason,
Stream icon,
DiscordEmoji emoji
) => ApiClient.ModifyGuildRoleAsync
Copy link
Member

Choose a reason for hiding this comment

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

formatting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

x2

Copy link
Member

@inftord inftord left a comment

Choose a reason for hiding this comment

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

On documentation side, LGTM

@Plerx2493
Copy link
Member

I think this is superseded by #1624 ?

@akiraveliara
Copy link
Member

no, but it would at least need to be modified for #1624

@akiraveliara akiraveliara removed the v5.x label Oct 5, 2023
@OoLunar
Copy link
Contributor Author

OoLunar commented Feb 8, 2024

Closing as it's blocked by #1647. When that PR merges, I will attempt this PR once more.

@OoLunar OoLunar closed this Feb 8, 2024
@OoLunar OoLunar deleted the origin/master/cleanup/DSharpPlus.Rest branch March 29, 2024 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants