Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Revert LiteDB version update #288

Closed
wants to merge 18 commits into from

Conversation

AbnerSquared
Copy link
Contributor

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

AbnerSquared and others added 18 commits March 10, 2020 22:02
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)
@petrspelos
Copy link
Member

*sigh

We need integration tests.

Copy link
Member

@petrspelos petrspelos left a 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.

@petrspelos
Copy link
Member

This PR is no longer relevant due to 8f6a090.
Closing

@petrspelos petrspelos closed this Mar 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

⛔ - LiteDB no longer functions as intended
2 participants