master
Tanner Collin 5 years ago
parent d379d2c138
commit a0f3c9ce11
  1. 20
      README.md
  2. 2
      setup.py

@ -6,7 +6,7 @@ bot with bot.
Install with `pip install --upgrade bwb`.
```
```text
# Import one of:
from bwb.tanner import bwb
from bwb.jason import bwb
@ -20,14 +20,14 @@ On boot up, send `000000handshake` to BWB chat.
When you see a `000000handshake`:
```
```text
secret = bwb.init()
await client.send_message(BWB, '000000handshake ' + secret)
```
When you see a `000000handshake [secret data]`:
```
```text
bwb.init(secret_data)
await client.send_message(BWB, bwb.wrap('🤝'))
```
@ -40,24 +40,24 @@ Run every incoming message through `bwb.parse()` since it's inexpensive. This wi
Example:
```
```text
if text.startswith('!'):
...
else:
authed, text = bwb.parse(text)
if note text: return
if not text: return
```
Use `bwb.wrap()` to auth and encode outgoing commands.
Params:
```
```text
wrap(text, target=None, b58=False, enc=False)
```
Examples:
```
```text
out = bwb.wrap('ping') # broadcast all bots
out = bwb.wrap('ping', target=TANNER) # auth for Tannerbot
out = bwb.wrap('ping', target=JASON, enc=True) # base58 encrypt
@ -72,7 +72,7 @@ Clone the repo.
To test your changes:
```
```text
pip install --upgrade ~/path/to/bwb
```
@ -80,7 +80,7 @@ pip install --upgrade ~/path/to/bwb
Install setuptools:
```
```text
python3 -m pip install --user --upgrade setuptools wheel
```
@ -88,6 +88,6 @@ python3 -m pip install --user --upgrade setuptools wheel
Build and upload:
```
```text
bash build-upload.sh
```

@ -5,7 +5,7 @@ with io.open('README.md', encoding='utf-8') as fh:
long_description = fh.read()
setuptools.setup(name='bwb',
version="1.0.5",
version="1.0.6",
description='bwb',
long_description=long_description,
long_description_content_type='text/markdown',

Loading…
Cancel
Save