Browse Source

Update building_block_commands.md

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

4
docs/bot_tutorial/building_block_commands.md

@ -57,8 +57,8 @@ def on_tag_command(self, event, name, value=None):
return event.msg.reply('Unknown tag: `{}`'.format(name))
```
A different way of adding arguments to a command is by using argparse.ArgumentParser. With agparser it's easier to create more complicated commands with many options or flags.
Right here, we'll recreate our math add command, but using agparser.
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.
```py
@Plugin.command('add', parser=True, group='math')
@Plugin.parser.add_argument('a', type=int)

Loading…
Cancel
Save