Browse Source

Merge 69f96aa3ba into 44156c7e01

pull/90/merge
Ezra Fielding 7 years ago
committed by GitHub
parent
commit
91c35924e7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      docs/bot_tutorial/building_block_commands.md

4
docs/bot_tutorial/building_block_commands.md

@ -6,7 +6,7 @@ In the case of these examples, when you send `!help` or `!info` the bot will rep
## Basic commands ## Basic commands
Creating commands in Disco is really easy because of the [Plugins](https://b1naryth1ef.github.io/disco/bot_tutorial/building_block_plugins.html) that are a core fundamential of Disco. For more info on them, read back in the [Plugins](https://b1naryth1ef.github.io/disco/bot_tutorial/building_block_plugins.html) section of this tutorial. Creating a basic command is done as follows: Creating commands in Disco is really easy because of the [Plugins](https://b1naryth1ef.github.io/disco/bot_tutorial/building_block_plugins.html) that are a core fundamental of Disco. For more info on them, read back in the [Plugins](https://b1naryth1ef.github.io/disco/bot_tutorial/building_block_plugins.html) section of this tutorial. Creating a basic command is done as follows:
First, create a Plugin class: First, create a Plugin class:
```py ```py
class myPlugin(Plugin): class myPlugin(Plugin):
@ -21,7 +21,7 @@ And there we go! Our very first command!
## Command arguments ## Command arguments
Next, lets go on to some more advanced commands. Wye'll create an echo command that will respond with whatever we put in to it. Next, lets go on to some more advanced commands. We'll create an echo command that will respond with whatever we put in to it.
```py ```py
@Plugin.command('echo', '<content:str...>') @Plugin.command('echo', '<content:str...>')
def on_echo_command(self, event, content): def on_echo_command(self, event, content):

Loading…
Cancel
Save