Skip to content

Commit

Permalink
changed notify config to depend on env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
kenryu42 committed Jul 2, 2022
1 parent 6adb6fa commit 2899151
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ NFT sales monitoring bot of the Ethereum blockchain. (ERC721, ERC1155)

- Discord

Notification is optional. You can turn it on or off in the configuration file.
Notification is optional. You can turn it on in the `./.env` file.

For example:

```
TWITTER_ENABLED=1
DISCORD_ENABLED=1
```

`config/setup.js` (Default is off).

Expand Down
4 changes: 2 additions & 2 deletions config/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ const IMAGE_SIZE = {
};

// Twitter api settings if enable (optional)
const TWITTER_ENABLED = false;
const TWITTER_ENABLED = process.env.TWITTER_ENABLED;
const TWITTER_API_KEY = process.env.TWITTER_API_KEY;
const TWITTER_API_SECRET = process.env.TWITTER_API_SECRET;
const TWITTER_ACCESS_TOKEN = process.env.TWITTER_ACCESS_TOKEN;
const TWITTER_ACCESS_SECRET = process.env.TWITTER_ACCESS_SECRET;

// Discord webhook settings if enable (optional)
const DISCORD_ENABLED = false;
const DISCORD_ENABLED = process.env.DISCORD_ENABLED;
const WEBHOOK_1 = process.env.WEBHOOK_URL;
const WEBHOOK_URLS = [WEBHOOK_1].filter((url) => url !== undefined);

Expand Down

0 comments on commit 2899151

Please sign in to comment.