diff --git a/PluralKit.Bot/CommandMeta/CommandParseErrors.cs b/PluralKit.Bot/CommandMeta/CommandParseErrors.cs index fae70988..ab9c9fae 100644 --- a/PluralKit.Bot/CommandMeta/CommandParseErrors.cs +++ b/PluralKit.Bot/CommandMeta/CommandParseErrors.cs @@ -8,7 +8,7 @@ public partial class CommandTree { if (commands.Length == 0) { - await ctx.Reply($"No commands related to {subject} was found. For the full list of commands, see the website: "); + await ctx.Reply($"No commands related to `{subject}` was found. For the full list of commands, see the website: "); return; } @@ -17,7 +17,7 @@ public partial class CommandTree new MessageComponent() { Type = ComponentType.Text, - Content = $"Here is a list of commands related to {subject}:\n{commands}\nFor a full list of possible commands, see .", + Content = $"Here is a list of commands related to `{subject}`:\n{commands}\nFor a full list of possible commands, see .", } ] ); diff --git a/crates/commands/src/write_cs_glue.rs b/crates/commands/src/write_cs_glue.rs index d6486a71..05340595 100644 --- a/crates/commands/src/write_cs_glue.rs +++ b/crates/commands/src/write_cs_glue.rs @@ -45,8 +45,9 @@ fn main() -> Result<(), Box> { for param in &command_params { writeln!( &mut command_params_init, - r#"@{name} = await ctx.ParamResolve{extract_fn_name}("{name}"){throw_null},"#, - name = param.name().replace("-", "_"), + r#"@{fieldName} = await ctx.ParamResolve{extract_fn_name}("{name}"){throw_null},"#, + fieldName = param.name().replace("-", "_"), + name = param.name(), extract_fn_name = get_param_param_ty(param.kind()), throw_null = param .is_optional() @@ -59,15 +60,17 @@ fn main() -> Result<(), Box> { if let Some(param) = flag.get_value() { writeln!( &mut command_flags_init, - r#"@{name} = await ctx.FlagResolve{extract_fn_name}("{name}"),"#, - name = flag.get_name().replace("-", "_"), + r#"@{fieldName} = await ctx.FlagResolve{extract_fn_name}("{name}"),"#, + fieldName = flag.get_name().replace("-", "_"), + name = flag.get_name(), extract_fn_name = get_param_param_ty(param.kind()), )?; } else { writeln!( &mut command_flags_init, - r#"@{name} = ctx.Parameters.HasFlag("{name}"),"#, - name = flag.get_name().replace("-", "_"), + r#"@{fieldName} = ctx.Parameters.HasFlag("{name}"),"#, + fieldName = flag.get_name().replace("-", "_"), + name = flag.get_name(), )?; } }