Browse Source

Update building_block_commands.md

pull/56/head
Jari (LotU) 8 years ago
committed by GitHub
parent
commit
b2d29ce175
  1. 2
      docs/bot_tutorial/building_block_commands.md

2
docs/bot_tutorial/building_block_commands.md

@ -58,7 +58,7 @@ def on_tag_command(self, event, name, value=None):
```
A different way of adding arguments to a command is by using argparse.ArgumentParser. With argparser it's easier to create more complicated commands with many options or flags.
Right here, we'll recreate our math add command, but using argparser.
Right here, we'll recreate our math add command, but using argparser. More info on argparser and the add_argument() method can be found [here](https://docs.python.org/2/library/argparse.html#the-add-argument-method)
```py
@Plugin.command('add', parser=True, group='math')
@Plugin.parser.add_argument('a', type=int)

Loading…
Cancel
Save