Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

Commit

Permalink
Cleanup documentation a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
b1naryth1ef committed Nov 29, 2017
1 parent 7fd0863 commit f4956aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/bot_tutorial/first_steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The \_\_init\_\_.py file is required for Python to find your plugin, but it can
{% endhint %}


Within the config file, paste the following template configuration and modify the token key to contain the token you obtained above:
Now lets setup the configuration file. To start off with we'll paste the following template in and modify our token key (`MY_BOT_TOKEN_HERE`) to be the token we obtained above. The plugins section tells disco what plugins to load, based on a module path (similar to how Python imports work). In this example we're asking disco to load the plugin contained in the tutorial file within the plugins directory (or "module"). Disco by default loads the first plugin it finds within the module, so you want to make sure each plugin class is contained within its own file.

```yaml
token: 'MY_BOT_TOKEN_HERE'
Expand All @@ -31,8 +31,8 @@ bot:
- plugins.tutorial
```

Now, within the python file (`tutorial.py`), lets write some code:

Now we're ready to write our plugin. Plugins are used to isolate the functionality of your bot into components. Plugins can be dynamically loaded, unloaded and reloaded at runtime. Lets start off by writing a plugin with a "ping" command;

```python
from disco.bot import Plugin
Expand All @@ -44,7 +44,7 @@ class TutorialPlugin(Plugin):
event.msg.reply('Pong!')
```

And finally, we're ready to start and test the bot. We can do this by executing the following command from within our project directory:
Now that we have a plugin setup and our configuration is ready, we can run and test the bot. We can do this by executing the following command from within our project directory:


```sh
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pip install disco-py
Disco provides a set of optional dependencies which add various bits of functionality or performance changes when installed. These can all be installed in a similar fashion to Disco;

```sh
pip install disco[performance]
pip install disco-py[performance]
```

| Name | Explanation | Versions |
Expand Down

0 comments on commit f4956aa

Please sign in to comment.