This repository has been archived by the owner on Oct 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This ensures that all projects within Miunie are now set to the latest .NET Core, .NET Standard, and C# Language versions. All dependencies specified in Miunie were updated to their most recent counterparts. All classes mentioned were modified to follow StyleCop standards. One readonly value was made in EmbedConstructor to simplify .WithColor() when creating new embeds. All existing summaries were moved into HelpStrings.resx. HelpService now attempts to fetch a summary for the specified ID in SummaryAttribute for a CommandInfo, and will now use ILanguageProvider for default string values.
This update should fix all issues previously mentioned and make some methods easier to handle. Changes - Created StringExtensions, which contains two methods of ValueOrDefault(this string, string) and JoinOrDefault(this IEnumerable<string>, string, string). - Created TExtensions, which contains one method of StringJoinOrDefault(this IEnumerable<T>, Func<T, string>, string, string). - Set all LangVersion properties to 8.0. - Modified HelpCommand, MiscCommands, ProfileCommand, RemoteRepositoryCommand, and TimeCommand to store their direct summaries and include examples. - Modified HelpCommandProvider to include three new methods of GetAllModuleSections(), GetSection(ModuleInfo), and GetSection(CommandInfo). - Modified HelpCommandProvider.Search to use GetSection(Command). - Modified HelpCommandProvider.GetDefault to use GetAllModuleSections(). - Modified HelpCommandProvider.GetExamples(CommandInfo) to use .StringJoinOrDefault(). - Modified HelpResult.Sections to implement IEnumerable<HelpSection> instead. - Modified HelpResult.Sections to expose the set property. - Modified Strings.resx to make HELP_SUMMARY_EMPTY and HELP_EXAMPLE_EMPTY include multiple response values. - Modified EmbedConstructor.GetHelpEmbed(HelpResult) to use MiuniePinkColor for its EmbedBuilder. - Renamed EmbedConstructor.DefaultEmbedColor to MiuniePinkColor and removed comment. - Renamed HelpService to HelpCommandProvider. - Renamed CommandService.GetHelpService(ILanguageProvider) to CommandService.GetHelpProvider(ILanguageProvider). - Reverted all .NET Standard targets back to 2.0. - Deleted HelpStrings.resx.
A quick change that fixes the previous string[].Length to now use the required IEnumerable<string>.Count().
Another minor fix that applies implicit declaration where it was needed, alongside adding a blank line in between a variable and a for each statement.
- Created new method GetModuleCommandBlocks(ModuleInfo) in HelpCommandProvider. - Modified ProfileCommand to use "to" instead of "for" in both summaries. - Modified HelpCommandProvider.GetDefault() to use _commandService.Modules.Select() instead. - Modified HelpCommandProvider.GetSection(ModuleInfo) to use GetModuleCommandBlocks(). - Removed HelpCommandProvider.GetAllModuleHelpSections().
- Modified HelpCommandProvider.Search(string) to use the similar .Select() method used in GetDefault().
- Modify Container.AddMiunieTypes(this IServiceCollection) to include CommandService - Modify method GetHelp() in HelpCommand to handle sending the message result - Modify method GetHelp(string) in HelpCommand to handle sending the message result - Renamed HelpCommandProvider to CommandHelpProvider - Rename method GetDefault() to ForAllCommands() in CommandHelpProvider - Rename method Search(string) to FromInput(string) in CommandHelpProvider - Remove method GetHelpProvider(ILanguageProvider) from CommandHandler - Remove method ShowDefaultHelpAsync(IMessageChannel) in CommandHelpProvider - Remove method ShowCommandHelpAsync(IMessageChannel, string) from CommandHelpProvider - Delete StringExtensions - Delete TExtensions
This quick formatting fix properly renames the specified variables, as brought to light by 1n5an1ty.
This push now correctly renames the private variables mentioned.
This update broke all of the time commands due to changes in how LiteDB handles methods. The change has been reverted.
Create Help Command and Refactor (control-net#275)
*sigh We need integration tests. |
petrspelos
suggested changes
Mar 14, 2020
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 only change in this PR is a newline in a switch expression.
This PR is no longer relevant due to 8f6a090. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue
Fixes #287
Changes
This change reverts the LiteDB version update back to
4.1.4
.Co-Authors
@1n5an1ty - Bringing the issue up to light