Closed Sessional closed 2 years ago
going to ask @Cenngo here for this.
you should be able to create a custom implementation of NamedArgumentTypeReader and register it for the types you plan to target. Sadly i dont think CommandService allow you to register generic TypeReaders so you have to register that for every type that you are going to use manually.
I would like to change the format of the named arguments to be something a little less obtuse for what my team is familiar with. (We use bash/zsh). I will gladly accept someone's code that does this, but also willing to write it myself. However, having a few issues getting my head wrapped around the organization of the code.
Documented format (from https://discordnet.dev/guides/text_commands/namedarguments.html)
.act 42 first: Hello fourth: "A string with spaces must be wrapped in quotes" second: World
Desired format:
.act --first Hello --fourth "A string with spaces must be wrapped in quotes" --second "World" 42
By the looks of it, I need to end up in the "ExecuteAsync" in in the CommandService. I would love to attach my debugger and step through this but there appears to be no SourceLink (https://github.com/dotnet/sourcelink/blob/main/README.md) to expose debug symbols via NuGet. Instead I have been digging around source code trying to understand what flow I am hitting. Do I need to download source and compile it and add a reference that way to get at PDBs?