update readme
This commit is contained in:
parent
0e94b860e4
commit
82787cc428
@ -8,6 +8,7 @@ Head to https://www.originprotocol.com/developers to learn more about what we're
|
|||||||
- Bans users for posting messagses matching specified patterns
|
- Bans users for posting messagses matching specified patterns
|
||||||
- Bans users with usernames matching specified patterns
|
- Bans users with usernames matching specified patterns
|
||||||
- Records logs of converstations
|
- Records logs of converstations
|
||||||
|
- Translates foreign languages to English using Google Translate
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@ -17,10 +18,13 @@ Head to https://www.originprotocol.com/developers to learn more about what we're
|
|||||||
- `pip install --upgrade -r requirements.txt`
|
- `pip install --upgrade -r requirements.txt`
|
||||||
|
|
||||||
## Database setup
|
## Database setup
|
||||||
|
|
||||||
- Store database URL in environment variable.
|
- Store database URL in environment variable.
|
||||||
|
|
||||||
```
|
```
|
||||||
export TELEGRAM_BOT_POSTGRES_URL="postgresql://<user>:<password>@localhost:5432/<databasename>"
|
export TELEGRAM_BOT_POSTGRES_URL="postgresql://<user>:<password>@localhost:5432/<databasename>"
|
||||||
```
|
```
|
||||||
|
|
||||||
- Run: `python model.py` to setup the DB tables.
|
- Run: `python model.py` to setup the DB tables.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
@ -32,6 +36,7 @@ Head to https://www.originprotocol.com/developers to learn more about what we're
|
|||||||
```
|
```
|
||||||
export TELEGRAM_BOT_TOKEN="4813829027:ADJFKAf0plousH2EZ2jBfxxRWFld3oK34ya"
|
export TELEGRAM_BOT_TOKEN="4813829027:ADJFKAf0plousH2EZ2jBfxxRWFld3oK34ya"
|
||||||
```
|
```
|
||||||
|
|
||||||
- Create your Telegram group.
|
- Create your Telegram group.
|
||||||
- Add your bot to the group like so: https://stackoverflow.com/questions/37338101/how-to-add-a-bot-to-a-telegram-group
|
- Add your bot to the group like so: https://stackoverflow.com/questions/37338101/how-to-add-a-bot-to-a-telegram-group
|
||||||
- Make your bot an admin in the group
|
- Make your bot an admin in the group
|
||||||
@ -49,6 +54,7 @@ Head to https://www.originprotocol.com/developers to learn more about what we're
|
|||||||
- `NOTIFY_CHAT` : ID of chat to report actions. Can be useful if you have an admin-only chat where you want to monitor the bot's activity. E.g. `-140532994`
|
- `NOTIFY_CHAT` : ID of chat to report actions. Can be useful if you have an admin-only chat where you want to monitor the bot's activity. E.g. `-140532994`
|
||||||
|
|
||||||
Sample bash file to set `MESSAGE_BAN_PATTERNS`:
|
Sample bash file to set `MESSAGE_BAN_PATTERNS`:
|
||||||
|
|
||||||
```
|
```
|
||||||
read -r -d '' MESSAGE_BAN_PATTERNS << 'EOF'
|
read -r -d '' MESSAGE_BAN_PATTERNS << 'EOF'
|
||||||
# ETH Address
|
# ETH Address
|
||||||
@ -67,8 +73,10 @@ By default, any attachments other than images or animations will cause the messa
|
|||||||
## Running
|
## Running
|
||||||
|
|
||||||
### Locally
|
### Locally
|
||||||
|
|
||||||
- Run: `python bot.py` to start logger
|
- Run: `python bot.py` to start logger
|
||||||
- Messages will be displayed on `stdout` as they are logged.
|
- Messages will be displayed on `stdout` as they are logged.
|
||||||
|
|
||||||
### On Heroku
|
### On Heroku
|
||||||
|
|
||||||
- You must enable the worker on Heroku app dashboard. (By default it is off.)
|
- You must enable the worker on Heroku app dashboard. (By default it is off.)
|
||||||
|
Loading…
Reference in New Issue
Block a user