-
-
Notifications
You must be signed in to change notification settings - Fork 318
Cleanup DSharpPlus.Rest #1548
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
Cleanup DSharpPlus.Rest #1548
Conversation
inftord
left a comment
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.
one small nitpick, but overall it's good
akiraveliara
left a comment
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 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 |
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.
please put this in its own block, not an expression body
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 .editorconfig will cause a compiler warning, informing us to make it an expression. What is your proposed solution?
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.
change it to only prefer expressions on single lines?
| Optional<int> defaultPerUserRatelimit, | ||
| Optional<DefaultSortOrder?> defaultSortOrder, | ||
| Optional<DefaultForumLayout> defaultForumLayout | ||
| ) => ApiClient.ModifyChannelAsync |
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.
same 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.
x2
| VerificationLevel? verificationLevel, | ||
| DefaultMessageNotifications? defaultMessageNotifications, | ||
| SystemChannelFlags? systemChannelFlags | ||
| ) => ApiClient.CreateGuildAsync(name, regionId, iconBase64, verificationLevel, defaultMessageNotifications, systemChannelFlags); |
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.
formatting
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.
x2
| Optional<ulong?> rulesChannelId, | ||
| Optional<SystemChannelFlags> systemChannelFlags, | ||
| string reason | ||
| ) => ApiClient.ModifyGuildAsync( |
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.
as above
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.
x2
| IEnumerable<DiscordRole> roles, | ||
| bool muted, | ||
| bool deafened | ||
| ) => ApiClient.AddGuildMemberAsync(guildId, userId, accessToken, nick, roles, muted, deafened); |
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.
formatting
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.
x2
| Optional<ulong?> voiceChannelId, | ||
| Optional<DateTimeOffset?> communicationDisabledUntil, | ||
| string reason | ||
| ) => ApiClient.ModifyGuildMemberAsync(guildId, userId, nick, roleIds, mute, deaf, voiceChannelId, communicationDisabledUntil, reason); |
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.
formatting
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.
x2
| string reason, | ||
| Stream icon, | ||
| DiscordEmoji emoji | ||
| ) => ApiClient.ModifyGuildRoleAsync |
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.
formatting
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.
x2
inftord
left a comment
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.
On documentation side, LGTM
|
I think this is superseded by #1624 ? |
|
no, but it would at least need to be modified for #1624 |
|
Closing as it's blocked by #1647. When that PR merges, I will attempt this PR once more. |
Summary
Splits the
DSharpPlus.Restproject 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.