Open alpinweis opened 3 years ago
As how the arg_botcmd is working now, first argument creates the ArgumentParser object, and does not allow setting the required flag you're looking for. https://docs.python.org/3/library/argparse.html#required
But the next ones can use the argparse options. https://github.com/errbotio/errbot/blob/54542fd38250b4cb977283854c5cb2b446b1281b/errbot/__init__.py#L445
In order to let us help you better, please fill out the following fields as best you can:
I am...
I am running...
Issue description
I have a command with an argument. I'd like it to work with a default value if the argument is omitted.
I get an error when I try to run it w/o an argument.
The correct/expected result would be for the command to pick the default value
myservice
for the missing argumentservice_name
. I also tried to use a default arg value in the method signature, but it did not help.