Skip to content
This repository was archived by the owner on Jul 2, 2019. It is now read-only.

Commit d9670f1

Browse files
committed
reorangize README
1 parent 059fbf9 commit d9670f1

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,6 @@ def github():
7272
message.send_webapi('', json.dumps(attachments))
7373
```
7474

75-
### Command Parameter Support
76-
77-
If you would like to have a command like 'stats' and 'stats start_date end_date', you can create reg ex like so:
78-
79-
```python
80-
from slackbot.bot import respond_to
81-
import re
82-
83-
84-
@respond_to('stat$', re.IGNORECASE)
85-
@respond_to('stat (.*) (.*)', re.IGNORECASE)
86-
def stats(message, start_date=None, end_date=None):
87-
```
88-
8975
## Plugins
9076

9177
A chat bot is meaningless unless you can extend/customize it to fit your own use cases.
@@ -126,6 +112,19 @@ def giveme(message, something):
126112
message.reply('Here is %s' % something)
127113
```
128114

115+
If you would like to have a command like 'stats' and 'stats start_date end_date', you can create reg ex like so:
116+
117+
```python
118+
from slackbot.bot import respond_to
119+
import re
120+
121+
122+
@respond_to('stat$', re.IGNORECASE)
123+
@respond_to('stat (.*) (.*)', re.IGNORECASE)
124+
def stats(message, start_date=None, end_date=None):
125+
```
126+
127+
129128
And add the plugins module to `PLUGINS` list of slackbot settings, e.g. slackbot_settings.py:
130129

131130
```python

0 commit comments

Comments
 (0)