Compare commits
4 commits
b3d2785cec
...
4d3bdc2481
Author | SHA1 | Date | |
---|---|---|---|
4d3bdc2481 | |||
a1bf03ad40 | |||
2d3c7de8e7 | |||
9044a04c87 |
9 changed files with 306 additions and 117 deletions
208
.editorconfig
Normal file
208
.editorconfig
Normal file
|
@ -0,0 +1,208 @@
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8-bom
|
||||||
|
end_of_line = crlf
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
insert_final_newline = false
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
# Microsoft .NET properties
|
||||||
|
csharp_new_line_before_members_in_object_initializers = false
|
||||||
|
csharp_preferred_modifier_order = public, private, protected, internal, file, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async, required:suggestion
|
||||||
|
csharp_style_prefer_utf8_string_literals = true:suggestion
|
||||||
|
csharp_style_var_elsewhere = true:suggestion
|
||||||
|
csharp_style_var_for_built_in_types = true:suggestion
|
||||||
|
csharp_style_var_when_type_is_apparent = true:suggestion
|
||||||
|
dotnet_naming_rule.constants_rule.import_to_resharper = True
|
||||||
|
dotnet_naming_rule.constants_rule.resharper_description = Constant fields (not private)
|
||||||
|
dotnet_naming_rule.constants_rule.resharper_guid = 669e5282-fb4b-4e90-91e7-07d269d04b60
|
||||||
|
dotnet_naming_rule.constants_rule.severity = suggestion
|
||||||
|
dotnet_naming_rule.constants_rule.style = all_upper_style
|
||||||
|
dotnet_naming_rule.constants_rule.symbols = constants_symbols
|
||||||
|
dotnet_naming_rule.interfaces_rule.import_to_resharper = True
|
||||||
|
dotnet_naming_rule.interfaces_rule.resharper_description = Interfaces
|
||||||
|
dotnet_naming_rule.interfaces_rule.resharper_guid = a7a3339e-4e89-4319-9735-a9dc4cb74cc7
|
||||||
|
dotnet_naming_rule.interfaces_rule.severity = suggestion
|
||||||
|
dotnet_naming_rule.interfaces_rule.style = i_upper_camel_case_style
|
||||||
|
dotnet_naming_rule.interfaces_rule.symbols = interfaces_symbols
|
||||||
|
dotnet_naming_rule.local_constants_rule.import_to_resharper = True
|
||||||
|
dotnet_naming_rule.local_constants_rule.resharper_description = Local constants
|
||||||
|
dotnet_naming_rule.local_constants_rule.resharper_guid = a4f433b8-abcd-4e55-a08f-82e78cef0f0c
|
||||||
|
dotnet_naming_rule.local_constants_rule.severity = suggestion
|
||||||
|
dotnet_naming_rule.local_constants_rule.style = all_upper_style
|
||||||
|
dotnet_naming_rule.local_constants_rule.symbols = local_constants_symbols
|
||||||
|
dotnet_naming_rule.private_constants_rule.import_to_resharper = True
|
||||||
|
dotnet_naming_rule.private_constants_rule.resharper_description = Constant fields (private)
|
||||||
|
dotnet_naming_rule.private_constants_rule.resharper_guid = 236f7aa5-7b06-43ca-bf2a-9b31bfcff09a
|
||||||
|
dotnet_naming_rule.private_constants_rule.severity = suggestion
|
||||||
|
dotnet_naming_rule.private_constants_rule.style = all_upper_style
|
||||||
|
dotnet_naming_rule.private_constants_rule.symbols = private_constants_symbols
|
||||||
|
dotnet_naming_rule.private_instance_fields_rule.import_to_resharper = True
|
||||||
|
dotnet_naming_rule.private_instance_fields_rule.resharper_description = Instance fields (private)
|
||||||
|
dotnet_naming_rule.private_instance_fields_rule.resharper_guid = 4a98fdf6-7d98-4f5a-afeb-ea44ad98c70c
|
||||||
|
dotnet_naming_rule.private_instance_fields_rule.severity = suggestion
|
||||||
|
dotnet_naming_rule.private_instance_fields_rule.style = lower_camel_case_style
|
||||||
|
dotnet_naming_rule.private_instance_fields_rule.symbols = private_instance_fields_symbols
|
||||||
|
dotnet_naming_rule.private_static_fields_rule.import_to_resharper = True
|
||||||
|
dotnet_naming_rule.private_static_fields_rule.resharper_description = Static fields (private)
|
||||||
|
dotnet_naming_rule.private_static_fields_rule.resharper_exclusive_prefixes_suffixes = true
|
||||||
|
dotnet_naming_rule.private_static_fields_rule.resharper_guid = f9fce829-e6f4-4cb2-80f1-5497c44f51df
|
||||||
|
dotnet_naming_rule.private_static_fields_rule.severity = suggestion
|
||||||
|
dotnet_naming_rule.private_static_fields_rule.style = lower_camel_case_style
|
||||||
|
dotnet_naming_rule.private_static_fields_rule.symbols = private_static_fields_symbols
|
||||||
|
dotnet_naming_rule.private_static_readonly_rule.import_to_resharper = True
|
||||||
|
dotnet_naming_rule.private_static_readonly_rule.resharper_description = Static readonly fields (private)
|
||||||
|
dotnet_naming_rule.private_static_readonly_rule.resharper_guid = 15b5b1f1-457c-4ca6-b278-5615aedc07d3
|
||||||
|
dotnet_naming_rule.private_static_readonly_rule.severity = suggestion
|
||||||
|
dotnet_naming_rule.private_static_readonly_rule.style = lower_camel_case_style
|
||||||
|
dotnet_naming_rule.private_static_readonly_rule.symbols = private_static_readonly_symbols
|
||||||
|
dotnet_naming_rule.type_parameters_rule.import_to_resharper = True
|
||||||
|
dotnet_naming_rule.type_parameters_rule.resharper_description = Type parameters
|
||||||
|
dotnet_naming_rule.type_parameters_rule.resharper_guid = 2c62818f-621b-4425-adc9-78611099bfcb
|
||||||
|
dotnet_naming_rule.type_parameters_rule.severity = suggestion
|
||||||
|
dotnet_naming_rule.type_parameters_rule.style = t_upper_camel_case_style
|
||||||
|
dotnet_naming_rule.type_parameters_rule.symbols = type_parameters_symbols
|
||||||
|
dotnet_naming_style.all_upper_style.capitalization = all_upper
|
||||||
|
dotnet_naming_style.all_upper_style.word_separator = _
|
||||||
|
dotnet_naming_style.i_upper_camel_case_style.capitalization = pascal_case
|
||||||
|
dotnet_naming_style.i_upper_camel_case_style.required_prefix = I
|
||||||
|
dotnet_naming_style.lower_camel_case_style.capitalization = camel_case
|
||||||
|
dotnet_naming_style.lower_camel_case_style.required_prefix = _
|
||||||
|
dotnet_naming_style.t_upper_camel_case_style.capitalization = pascal_case
|
||||||
|
dotnet_naming_style.t_upper_camel_case_style.required_prefix = T
|
||||||
|
dotnet_naming_symbols.constants_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected
|
||||||
|
dotnet_naming_symbols.constants_symbols.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.constants_symbols.required_modifiers = const
|
||||||
|
dotnet_naming_symbols.constants_symbols.resharper_applicable_kinds = constant_field
|
||||||
|
dotnet_naming_symbols.constants_symbols.resharper_required_modifiers = any
|
||||||
|
dotnet_naming_symbols.interfaces_symbols.applicable_accessibilities = *
|
||||||
|
dotnet_naming_symbols.interfaces_symbols.applicable_kinds = interface
|
||||||
|
dotnet_naming_symbols.interfaces_symbols.resharper_applicable_kinds = interface
|
||||||
|
dotnet_naming_symbols.interfaces_symbols.resharper_required_modifiers = any
|
||||||
|
dotnet_naming_symbols.local_constants_symbols.applicable_accessibilities = *
|
||||||
|
dotnet_naming_symbols.local_constants_symbols.applicable_kinds = local
|
||||||
|
dotnet_naming_symbols.local_constants_symbols.required_modifiers = const
|
||||||
|
dotnet_naming_symbols.local_constants_symbols.resharper_applicable_kinds = local_constant
|
||||||
|
dotnet_naming_symbols.local_constants_symbols.resharper_required_modifiers = any
|
||||||
|
dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities = private
|
||||||
|
dotnet_naming_symbols.private_constants_symbols.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.private_constants_symbols.required_modifiers = const
|
||||||
|
dotnet_naming_symbols.private_constants_symbols.resharper_applicable_kinds = constant_field
|
||||||
|
dotnet_naming_symbols.private_constants_symbols.resharper_required_modifiers = any
|
||||||
|
dotnet_naming_symbols.private_instance_fields_symbols.applicable_accessibilities = private
|
||||||
|
dotnet_naming_symbols.private_instance_fields_symbols.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.private_instance_fields_symbols.resharper_applicable_kinds = field,readonly_field
|
||||||
|
dotnet_naming_symbols.private_instance_fields_symbols.resharper_required_modifiers = instance
|
||||||
|
dotnet_naming_symbols.private_static_fields_symbols.applicable_accessibilities = private
|
||||||
|
dotnet_naming_symbols.private_static_fields_symbols.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.private_static_fields_symbols.required_modifiers = static
|
||||||
|
dotnet_naming_symbols.private_static_fields_symbols.resharper_applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.private_static_fields_symbols.resharper_required_modifiers = static
|
||||||
|
dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities = private
|
||||||
|
dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = readonly,static
|
||||||
|
dotnet_naming_symbols.private_static_readonly_symbols.resharper_applicable_kinds = readonly_field
|
||||||
|
dotnet_naming_symbols.private_static_readonly_symbols.resharper_required_modifiers = static
|
||||||
|
dotnet_naming_symbols.type_parameters_symbols.applicable_accessibilities = *
|
||||||
|
dotnet_naming_symbols.type_parameters_symbols.applicable_kinds = type_parameter
|
||||||
|
dotnet_naming_symbols.type_parameters_symbols.resharper_applicable_kinds = type_parameter
|
||||||
|
dotnet_naming_symbols.type_parameters_symbols.resharper_required_modifiers = any
|
||||||
|
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none
|
||||||
|
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:none
|
||||||
|
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none
|
||||||
|
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
|
||||||
|
dotnet_style_predefined_type_for_member_access = true:suggestion
|
||||||
|
dotnet_style_qualification_for_event = false:suggestion
|
||||||
|
dotnet_style_qualification_for_field = false:suggestion
|
||||||
|
dotnet_style_qualification_for_method = false:suggestion
|
||||||
|
dotnet_style_qualification_for_property = false:suggestion
|
||||||
|
|
||||||
|
# ReSharper properties
|
||||||
|
resharper_autodetect_indent_settings = true
|
||||||
|
resharper_csharp_wrap_arguments_style = chop_if_long
|
||||||
|
resharper_force_attribute_style = join
|
||||||
|
resharper_formatter_off_tag = @formatter:off
|
||||||
|
resharper_formatter_on_tag = @formatter:on
|
||||||
|
resharper_formatter_tags_enabled = true
|
||||||
|
resharper_keep_existing_embedded_arrangement = false
|
||||||
|
resharper_keep_existing_expr_member_arrangement = false
|
||||||
|
resharper_method_or_operator_body = expression_body
|
||||||
|
resharper_object_creation_when_type_not_evident = target_typed
|
||||||
|
resharper_place_accessorholder_attribute_on_same_line = false
|
||||||
|
resharper_place_accessor_attribute_on_same_line = false
|
||||||
|
resharper_place_expr_method_on_single_line = false
|
||||||
|
resharper_place_expr_property_on_single_line = false
|
||||||
|
resharper_place_field_attribute_on_same_line = false
|
||||||
|
resharper_place_simple_embedded_statement_on_same_line = false
|
||||||
|
resharper_show_autodetect_configure_formatting_tip = false
|
||||||
|
resharper_use_indent_from_vs = false
|
||||||
|
resharper_wrap_before_arrow_with_expressions = true
|
||||||
|
|
||||||
|
# ReSharper inspection severities
|
||||||
|
resharper_arrange_constructor_or_destructor_body_highlighting = hint
|
||||||
|
resharper_arrange_method_or_operator_body_highlighting = suggestion
|
||||||
|
resharper_arrange_object_creation_when_type_evident_highlighting = none
|
||||||
|
resharper_arrange_redundant_parentheses_highlighting = suggestion
|
||||||
|
resharper_arrange_this_qualifier_highlighting = hint
|
||||||
|
resharper_arrange_type_member_modifiers_highlighting = none
|
||||||
|
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
|
||||||
|
resharper_built_in_type_reference_style_highlighting = hint
|
||||||
|
resharper_check_namespace_highlighting = none
|
||||||
|
resharper_class_never_instantiated_global_highlighting = hint
|
||||||
|
resharper_convert_to_primary_constructor_highlighting = none
|
||||||
|
resharper_convert_to_using_declaration_highlighting = warning
|
||||||
|
resharper_convert_type_check_pattern_to_null_check_highlighting = hint
|
||||||
|
resharper_empty_general_catch_clause_highlighting = none
|
||||||
|
resharper_function_never_returns_highlighting = suggestion
|
||||||
|
resharper_inconsistent_naming_highlighting = suggestion
|
||||||
|
resharper_invert_if_highlighting = none
|
||||||
|
resharper_lambda_expression_can_be_made_static_highlighting = hint
|
||||||
|
resharper_mvc_action_not_resolved_highlighting = warning
|
||||||
|
resharper_mvc_area_not_resolved_highlighting = warning
|
||||||
|
resharper_mvc_controller_not_resolved_highlighting = warning
|
||||||
|
resharper_mvc_masterpage_not_resolved_highlighting = warning
|
||||||
|
resharper_mvc_partial_view_not_resolved_highlighting = warning
|
||||||
|
resharper_mvc_template_not_resolved_highlighting = warning
|
||||||
|
resharper_mvc_view_component_not_resolved_highlighting = warning
|
||||||
|
resharper_mvc_view_component_view_not_resolved_highlighting = warning
|
||||||
|
resharper_mvc_view_not_resolved_highlighting = warning
|
||||||
|
resharper_non_readonly_member_in_get_hash_code_highlighting = suggestion
|
||||||
|
resharper_not_accessed_field_local_highlighting = suggestion
|
||||||
|
resharper_out_parameter_value_is_always_discarded_local_highlighting = suggestion
|
||||||
|
resharper_private_field_can_be_converted_to_local_variable_highlighting = suggestion
|
||||||
|
resharper_razor_assembly_not_resolved_highlighting = warning
|
||||||
|
resharper_redundant_anonymous_type_property_name_highlighting = suggestion
|
||||||
|
resharper_redundant_base_qualifier_highlighting = warning
|
||||||
|
resharper_redundant_pattern_parentheses_highlighting = none
|
||||||
|
resharper_redundant_record_class_keyword_highlighting = suggestion
|
||||||
|
resharper_replace_with_single_call_to_first_or_default_highlighting = hint
|
||||||
|
resharper_suggest_var_or_type_built_in_types_highlighting = hint
|
||||||
|
resharper_suggest_var_or_type_elsewhere_highlighting = hint
|
||||||
|
resharper_suggest_var_or_type_simple_types_highlighting = hint
|
||||||
|
resharper_unused_method_return_value_local_highlighting = suggestion
|
||||||
|
resharper_use_await_using_highlighting = warning
|
||||||
|
resharper_web_config_module_not_resolved_highlighting = warning
|
||||||
|
resharper_web_config_type_not_resolved_highlighting = warning
|
||||||
|
resharper_web_config_wrong_module_highlighting = warning
|
||||||
|
|
||||||
|
[{*.har,*.json,*.jsonc,*.postman_collection,*.postman_collection.json,*.postman_environment,*.postman_environment.json}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[{*.yaml,*.yml}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[{*.bash,*.sh,*.zsh}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.proto]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.{appxmanifest,asax,ascx,aspx,axaml,blockshader,build,cg,cginc,compute,cs,cshtml,dtd,fx,fxh,hlsl,hlsli,hlslinc,master,nuspec,paml,razor,resw,resx,shaderFoundry,skin,urtshader,usf,ush,vb,xaml,xamlx,xoml,xsd}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
tab_width = 4
|
|
@ -1,17 +0,0 @@
|
||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Canti/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cbtnrole/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cclub/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Ccurrency/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cexpr/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cfilter/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cgiveaway/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cncanvas/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cpunish/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Croles/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cslowmode/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Csupport/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Ctodo/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cuntimer/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=db_005Cmodels_005Cxp/@EntryIndexedValue">True</s:Boolean>
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=modules_005Cadministration_005Cnotify_005Cmodels/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
|
|
@ -494,6 +494,9 @@ public sealed class LogCommandService : ILogCommandService, IReadyExecutor
|
||||||
.WithFooter(CurrentTime(usr.Guild))
|
.WithFooter(CurrentTime(usr.Guild))
|
||||||
.WithOkColor();
|
.WithOkColor();
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(reason))
|
||||||
|
embed.WithDescription(reason);
|
||||||
|
|
||||||
await _sender.Response(logChannel).Embed(embed).SendAsync();
|
await _sender.Response(logChannel).Embed(embed).SendAsync();
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
|
|
@ -24,7 +24,10 @@ public partial class Games
|
||||||
var cRes = await cache.GetAsync(FishingWhitelistKey(ctx.User.Id));
|
var cRes = await cache.GetAsync(FishingWhitelistKey(ctx.User.Id));
|
||||||
if (cRes.TryPickT1(out _, out _))
|
if (cRes.TryPickT1(out _, out _))
|
||||||
{
|
{
|
||||||
var password = await captchaService.GetUserCaptcha(ctx.User.Id);
|
string? password = null;
|
||||||
|
if (fcs.Data.RequireCaptcha)
|
||||||
|
password = await captchaService.GetUserCaptcha(ctx.User.Id);
|
||||||
|
|
||||||
if (password is not null)
|
if (password is not null)
|
||||||
{
|
{
|
||||||
var img = captchaService.GetPasswordImage(password);
|
var img = captchaService.GetPasswordImage(password);
|
||||||
|
@ -72,16 +75,16 @@ public partial class Games
|
||||||
var spot = fs.GetSpot(ctx.Channel.Id);
|
var spot = fs.GetSpot(ctx.Channel.Id);
|
||||||
|
|
||||||
var msg = await Response()
|
var msg = await Response()
|
||||||
.Embed(CreateEmbed()
|
.Embed(CreateEmbed()
|
||||||
.WithPendingColor()
|
.WithPendingColor()
|
||||||
.WithAuthor(ctx.User)
|
.WithAuthor(ctx.User)
|
||||||
.WithDescription(GetText(strs.fish_waiting))
|
.WithDescription(GetText(strs.fish_waiting))
|
||||||
.AddField(GetText(strs.fish_spot), GetSpotEmoji(spot) + " " + spot.ToString(), true)
|
.AddField(GetText(strs.fish_spot), GetSpotEmoji(spot) + " " + spot.ToString(), true)
|
||||||
.AddField(GetText(strs.fish_weather),
|
.AddField(GetText(strs.fish_weather),
|
||||||
GetWeatherEmoji(currentWeather) + " " + currentWeather,
|
GetWeatherEmoji(currentWeather) + " " + currentWeather,
|
||||||
true)
|
true)
|
||||||
.AddField(GetText(strs.fish_tod), GetTodEmoji(currentTod) + " " + currentTod, true))
|
.AddField(GetText(strs.fish_tod), GetTodEmoji(currentTod) + " " + currentTod, true))
|
||||||
.SendAsync();
|
.SendAsync();
|
||||||
|
|
||||||
var res = await fishTask;
|
var res = await fishTask;
|
||||||
if (res is null)
|
if (res is null)
|
||||||
|
@ -98,14 +101,14 @@ public partial class Games
|
||||||
}
|
}
|
||||||
|
|
||||||
await Response()
|
await Response()
|
||||||
.Embed(CreateEmbed()
|
.Embed(CreateEmbed()
|
||||||
.WithOkColor()
|
.WithOkColor()
|
||||||
.WithAuthor(ctx.User)
|
.WithAuthor(ctx.User)
|
||||||
.WithDescription(desc)
|
.WithDescription(desc)
|
||||||
.AddField(GetText(strs.fish_quality), GetStarText(res.Stars, res.Fish.Stars), true)
|
.AddField(GetText(strs.fish_quality), GetStarText(res.Stars, res.Fish.Stars), true)
|
||||||
.AddField(GetText(strs.desc), res.Fish.Fluff, true)
|
.AddField(GetText(strs.desc), res.Fish.Fluff, true)
|
||||||
.WithThumbnailUrl(res.Fish.Image))
|
.WithThumbnailUrl(res.Fish.Image))
|
||||||
.SendAsync();
|
.SendAsync();
|
||||||
|
|
||||||
await msg.DeleteAsync();
|
await msg.DeleteAsync();
|
||||||
}
|
}
|
||||||
|
@ -118,15 +121,15 @@ public partial class Games
|
||||||
var time = fs.GetTime();
|
var time = fs.GetTime();
|
||||||
|
|
||||||
await Response()
|
await Response()
|
||||||
.Embed(CreateEmbed()
|
.Embed(CreateEmbed()
|
||||||
.WithOkColor()
|
.WithOkColor()
|
||||||
.WithDescription(GetText(strs.fish_weather_duration(fs.GetWeatherPeriodDuration())))
|
.WithDescription(GetText(strs.fish_weather_duration(fs.GetWeatherPeriodDuration())))
|
||||||
.AddField(GetText(strs.fish_spot), GetSpotEmoji(spot) + " " + spot, true)
|
.AddField(GetText(strs.fish_spot), GetSpotEmoji(spot) + " " + spot, true)
|
||||||
.AddField(GetText(strs.fish_tod), GetTodEmoji(time) + " " + time, true)
|
.AddField(GetText(strs.fish_tod), GetTodEmoji(time) + " " + time, true)
|
||||||
.AddField(GetText(strs.fish_weather_forecast),
|
.AddField(GetText(strs.fish_weather_forecast),
|
||||||
ws.Select(x => GetWeatherEmoji(x)).Join(""),
|
ws.Select(x => GetWeatherEmoji(x)).Join(""),
|
||||||
true))
|
true))
|
||||||
.SendAsync();
|
.SendAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Cmd]
|
[Cmd]
|
||||||
|
@ -143,43 +146,43 @@ public partial class Games
|
||||||
var catchDict = catches.ToDictionary(x => x.FishId, x => x);
|
var catchDict = catches.ToDictionary(x => x.FishId, x => x);
|
||||||
|
|
||||||
await Response()
|
await Response()
|
||||||
.Paginated()
|
.Paginated()
|
||||||
.Items(fishes)
|
.Items(fishes)
|
||||||
.PageSize(9)
|
.PageSize(9)
|
||||||
.CurrentPage(page)
|
.CurrentPage(page)
|
||||||
.Page((fs, i) =>
|
.Page((fs, i) =>
|
||||||
{
|
{
|
||||||
var eb = CreateEmbed()
|
var eb = CreateEmbed()
|
||||||
.WithDescription($"🧠 **Skill:** {skill} / {maxSkill}")
|
.WithDescription($"🧠 **Skill:** {skill} / {maxSkill}")
|
||||||
.WithAuthor(ctx.User)
|
.WithAuthor(ctx.User)
|
||||||
.WithTitle(GetText(strs.fish_list_title))
|
.WithTitle(GetText(strs.fish_list_title))
|
||||||
.WithOkColor();
|
.WithOkColor();
|
||||||
|
|
||||||
foreach (var f in fs)
|
foreach (var f in fs)
|
||||||
{
|
{
|
||||||
if (catchDict.TryGetValue(f.Id, out var c))
|
if (catchDict.TryGetValue(f.Id, out var c))
|
||||||
{
|
{
|
||||||
eb.AddField(f.Name,
|
eb.AddField(f.Name,
|
||||||
GetFishEmoji(f, c.Count)
|
GetFishEmoji(f, c.Count)
|
||||||
+ " "
|
+ " "
|
||||||
+ GetSpotEmoji(f.Spot)
|
+ GetSpotEmoji(f.Spot)
|
||||||
+ GetTodEmoji(f.Time)
|
+ GetTodEmoji(f.Time)
|
||||||
+ GetWeatherEmoji(f.Weather)
|
+ GetWeatherEmoji(f.Weather)
|
||||||
+ "\n"
|
+ "\n"
|
||||||
+ GetStarText(c.MaxStars, f.Stars)
|
+ GetStarText(c.MaxStars, f.Stars)
|
||||||
+ "\n"
|
+ "\n"
|
||||||
+ Format.Italics(f.Fluff),
|
+ Format.Italics(f.Fluff),
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
eb.AddField("?", GetFishEmoji(null, 0) + "\n" + GetStarText(0, f.Stars), true);
|
eb.AddField("?", GetFishEmoji(null, 0) + "\n" + GetStarText(0, f.Stars), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return eb;
|
return eb;
|
||||||
})
|
})
|
||||||
.SendAsync();
|
.SendAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetFishEmoji(FishData? fish, int count)
|
private string GetFishEmoji(FishData? fish, int count)
|
||||||
|
|
|
@ -7,9 +7,10 @@ namespace EllieBot.Modules.Games;
|
||||||
public sealed partial class FishConfig : ICloneable<FishConfig>
|
public sealed partial class FishConfig : ICloneable<FishConfig>
|
||||||
{
|
{
|
||||||
[Comment("DO NOT CHANGE")]
|
[Comment("DO NOT CHANGE")]
|
||||||
public int Version { get; set; } = 1;
|
public int Version { get; set; } = 2;
|
||||||
|
|
||||||
public string WeatherSeed { get; set; } = string.Empty;
|
public string WeatherSeed { get; set; } = string.Empty;
|
||||||
|
public bool RequireCaptcha { get; set; } = true;
|
||||||
public List<string> StarEmojis { get; set; } = new();
|
public List<string> StarEmojis { get; set; } = new();
|
||||||
public List<string> SpotEmojis { get; set; } = new();
|
public List<string> SpotEmojis { get; set; } = new();
|
||||||
public FishChance Chance { get; set; } = new FishChance();
|
public FishChance Chance { get; set; } = new FishChance();
|
||||||
|
|
|
@ -15,5 +15,15 @@ public sealed class FishConfigService : ConfigServiceBase<FishConfig>
|
||||||
IPubSub pubSub)
|
IPubSub pubSub)
|
||||||
: base(FILE_PATH, serializer, pubSub, _changeKey)
|
: base(FILE_PATH, serializer, pubSub, _changeKey)
|
||||||
{
|
{
|
||||||
|
Migrate();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Migrate()
|
||||||
|
{
|
||||||
|
ModifyConfig(c =>
|
||||||
|
{
|
||||||
|
c.Version = 2;
|
||||||
|
c.RequireCaptcha = true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -8258,20 +8258,6 @@
|
||||||
],
|
],
|
||||||
"Requirements": []
|
"Requirements": []
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Aliases": [
|
|
||||||
".xpgleaderboard",
|
|
||||||
".xpglb"
|
|
||||||
],
|
|
||||||
"Description": "Shows the global xp leaderboard.",
|
|
||||||
"Usage": [
|
|
||||||
".xpgleaderboard"
|
|
||||||
],
|
|
||||||
"Submodule": "Xp",
|
|
||||||
"Module": "Xp",
|
|
||||||
"Options": null,
|
|
||||||
"Requirements": []
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Aliases": [
|
"Aliases": [
|
||||||
".xplevelset"
|
".xplevelset"
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
# DO NOT CHANGE
|
# DO NOT CHANGE
|
||||||
version: 1
|
version: 2
|
||||||
weatherSeed: "w%29';^eGE)9oWHM(aI9I;%1[.r^z2ZS7ShV,l')o(e%#\"hVzb>oxQq^`.&/7srh"
|
weatherSeed: w%29';^eGE)9oWHM(aI9I;%1[.r^z2ZS7ShV,l')o(e%#"hVzb>oxQq^`.&/7srh
|
||||||
chance:
|
requireCaptcha: true
|
||||||
fish: 80
|
|
||||||
trash: 15
|
|
||||||
nothing: 5
|
|
||||||
starEmojis:
|
starEmojis:
|
||||||
- <:emptystar:1326838565786877962>
|
- <:emptystar:1326838565786877962>
|
||||||
- <:onestar:1326838456739168361>
|
- <:onestar:1326838456739168361>
|
||||||
|
@ -17,9 +14,13 @@ spotEmojis:
|
||||||
- <:lake:1328315260561788989>
|
- <:lake:1328315260561788989>
|
||||||
- <:swamp:1328519766083633224>
|
- <:swamp:1328519766083633224>
|
||||||
- <:reef:1328519744646545421>
|
- <:reef:1328519744646545421>
|
||||||
|
chance:
|
||||||
|
fish: 80
|
||||||
|
trash: 15
|
||||||
|
nothing: 5
|
||||||
fish:
|
fish:
|
||||||
- name: Bass
|
- id: 0
|
||||||
id: 0
|
name: Bass
|
||||||
weather:
|
weather:
|
||||||
spot:
|
spot:
|
||||||
time:
|
time:
|
||||||
|
@ -28,16 +29,16 @@ fish:
|
||||||
fluff: Very common.
|
fluff: Very common.
|
||||||
condition:
|
condition:
|
||||||
image: https://cdn.nadeko.bot/fish/bass.png
|
image: https://cdn.nadeko.bot/fish/bass.png
|
||||||
emoji: "<:bass:1328520376892002386>"
|
emoji: <:bass:1328520376892002386>
|
||||||
trash:
|
trash:
|
||||||
- name: Plastic Bag
|
- id: 1002
|
||||||
id: 1002
|
name: Plastic Bag
|
||||||
weather:
|
weather:
|
||||||
spot:
|
spot:
|
||||||
time:
|
time:
|
||||||
chance: 50
|
chance: 50
|
||||||
stars: 4
|
stars: 4
|
||||||
fluff: "Trophy of your contribution to the environment."
|
fluff: Trophy of your contribution to the environment.
|
||||||
condition:
|
condition:
|
||||||
image: https://cdn.nadeko.bot/fish/plasticbag.png
|
image: https://cdn.nadeko.bot/fish/plasticbag.png
|
||||||
emoji: "<:plasticbag:1328520895454515211>"
|
emoji: <:plasticbag:1328520895454515211>
|
|
@ -1,5 +1,5 @@
|
||||||
# DO NOT CHANGE
|
# DO NOT CHANGE
|
||||||
version: 10
|
version: 11
|
||||||
# How much XP will the users receive per message
|
# How much XP will the users receive per message
|
||||||
textXpPerMessage: 3
|
textXpPerMessage: 3
|
||||||
# How often can the users receive XP, in seconds
|
# How often can the users receive XP, in seconds
|
||||||
|
@ -7,19 +7,13 @@ textXpCooldown: 300
|
||||||
# Amount of xp users gain from posting an image
|
# Amount of xp users gain from posting an image
|
||||||
textXpFromImage: 3
|
textXpFromImage: 3
|
||||||
# Average amount of xp earned per minute in VC
|
# Average amount of xp earned per minute in VC
|
||||||
voiceXpPerMinute: 0
|
voiceXpPerMinute: 3
|
||||||
# Xp Shop config
|
# Xp Shop config
|
||||||
shop:
|
shop:
|
||||||
# Whether the xp shop is enabled
|
# Whether the xp shop is enabled
|
||||||
# True -> Users can access the xp shop using .xpshop command
|
# True -> Users can access the xp shop using .xpshop command
|
||||||
# False -> Users can't access the xp shop
|
# False -> Users can't access the xp shop
|
||||||
isEnabled: false
|
isEnabled: false
|
||||||
# Which patron tier do users need in order to use the .xpshop bgs command
|
|
||||||
# Leave at 'None' if patron system is disabled or you don't want any restrictions
|
|
||||||
bgsTierRequirement: None
|
|
||||||
# Which patron tier do users need in order to use the .xpshop frames command
|
|
||||||
# Leave at 'None' if patron system is disabled or you don't want any restrictions
|
|
||||||
framesTierRequirement: None
|
|
||||||
# Frames available for sale. Keys are unique IDs.
|
# Frames available for sale. Keys are unique IDs.
|
||||||
# Do not change keys as they are not publicly visible. Only change properties (name, price, id)
|
# Do not change keys as they are not publicly visible. Only change properties (name, price, id)
|
||||||
# Removing a key which previously existed means that all previous purchases will also be unusable.
|
# Removing a key which previously existed means that all previous purchases will also be unusable.
|
||||||
|
|
Loading…
Add table
Reference in a new issue