Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat command will ignore argument if a optional arg can't be parsed and will not try to parse it to the next arg #1

Open
AdelinaM17n opened this issue Jan 22, 2023 · 1 comment

Comments

@AdelinaM17n
Copy link
Owner

No description provided.

@AdelinaM17n
Copy link
Owner Author

When chat commands are parsed and it reaches a non coalescing argument, it will try to parse the argument to the current index arg type, and if it fails it will return null to that optional arg and remove the content string

var currentFieldType = orderedList[i].getType();
listObjects[i] = converterMap.containsKey(currentFieldType)
                        ? converterMap.get(currentFieldType).get(contents.get(0),apiWrapper) : null;
if(listObjects[i] != null) orderedList[i] = null;
contents.remove(0);

if the argument it tried to parse the content to is an optional one, it should not remove content string and rather try to parse it with the next argument

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant