Skip to content

Commit

Permalink
feature: doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
RuslanGlaznyov committed Apr 17, 2022
1 parent e4be653 commit 21afb02
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,35 @@ requirements:
node.js >=16.14.2
```

### Install dependencies

Install dependencies

`npm install`

Before run, store a `config.js` file in the project folder. The config sample can be find in `config.sample.js`
```
npm install
```
### Set up store with command
```
npm run setup
```
### Set up configs.

AND
Before run, store a `global.config.js` file in the project config folder. The config sample can be find in config folder `global.config.sample.js`
- SET `telegram` config.
If you want to run message via telegram transport, create `telegram.config.js` in `config/` folder. Sample is `telegram.config.sample.js`
- SET `discord` config. If you want to run message via discord transport, create `discord.config.js` in `config/` folder. Sample is `discord.config.sample.js`
- SET both config if you want to run `discord` and `telegram`

Add to data folder `telegram.json` file with default params `{ "last_notified_proposal_id": 0 }`

RUN with cron:
### RUN with cron:

example:
example with 2 transports:
```
*/30 * * * * cd /user/Heimdallbot && npm start -- --telegram --discord --silent >> /user/heimdallbot.log
```
*/30 * * * * cd /user/Heimdallbot && npm run run:tlg --silent >> /user/heimdallbot.log
example with 1 transports:
```
*/30 * * * * cd /user/Heimdallbot && npm start --silent -- --telegram >> /user/heimdallbot.log
```

if use `nvm` do alias

```
Expand Down
2 changes: 0 additions & 2 deletions src/execute-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,3 @@ async function executeMessage(transport, log, store) {
log.info('End')
}
module.exports = executeMessage

// main().catch(log.fatal)
1 change: 0 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ program
log.error('specify transport')
}
const executions = []
// '2023400876:AAF5Wrj6fxZCKCyLPsi5O8iQVILxHzL4wAE'
if (option.telegram) {
const telegramExecute = async () => {
const configInstance = Config()
Expand Down

0 comments on commit 21afb02

Please sign in to comment.