Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aerilym/session-node-bot
A Session monitoring bot for Session Nodes. ONS: nodebot
https://github.com/aerilym/session-node-bot
bot session
Last synced: about 2 months ago
JSON representation
A Session monitoring bot for Session Nodes. ONS: nodebot
- Host: GitHub
- URL: https://github.com/aerilym/session-node-bot
- Owner: Aerilym
- License: gpl-3.0
- Created: 2024-10-21T12:43:23.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-26T21:39:11.000Z (2 months ago)
- Last Synced: 2024-10-26T23:21:09.491Z (2 months ago)
- Topics: bot, session
- Language: TypeScript
- Homepage:
- Size: 85 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Session Node Bot
A [Session](https://getsession.org) monitoring bot for Session Nodes. Add nodes to a watch list and get notified on Session when something happens.
To use the bot on Session, you just need to send it a message:
**ONS:** nodebot
**Session ID:** 0503ebe227d3debbe467222e4134ec660e8c68d11b54ff527204393f5f4eeca125
**Note:** The bot currently only runs on the Session Testnet, the bot will notify you once Mainnet is available.
## Features
- ✅ Direct messages & management on [Session](https://getsession.org)
- ✅ Get notified on Session when something happens
- ✅ Node decommission alerts
- ✅ Node recommission alerts
- ✅ Add nodes to a watch list
- ✅ Ethereum wallet node search
- ✅ Session Network informationWIP:
- 🔳 Lookup Session Node info & stats
- 🔳 Notifications of new Open Multi-contributor nodes
- 🔳 Rewards stats## Usage
The bot will send you an onboarding message if you message it and havent joined yet. You can send it a `/help` command message to get a list of available commands, but most commands won't be available until you use the `/join` command.
## Getting Started
To install dependencies:
```bash
bun install
```To run:
```bash
bun start
```### Environment Variables
| Variable | Explanation |
|----------------------------------------|---------------------------------------------------------------------------------------------------------|
| DEBUG | Enable debug logging and debugging features. (if truthy) eg: 1 or true |
| BOT_SECRET_KEY | The Session Recovery Phrase for the bot. |
| BOT_USERNAME | The bot's Session display name. |
| RPC_SERVICE_NODE | The RPC endpoint for communicating with a Session Node. (Only used for RPC calls, not sending messages) |
| RPC_SERVICE_NODE_BACKUP | A backup RPC endpoint if the primary fails. |
| MESSAGE_SEND_RETRY_MAX | Number of times to retry sending a message if if it fails. |
| SESSION_REMOTE_LOG_PREFIX | Prefix for remote info logs. eg: \[INFO\] |
| SESSION_REMOTE_LOG_ADDRESS | Session Id to send remote info logs to. |
| SESSION_REMOTE_LOG_PREFIX_ERROR | Prefix for remote error logs. eg: \[ERROR\] |
| SESSION_REMOTE_LOG_ADDRESS_ERROR | Session Id to send remote error logs to. |
| POLLER_TEST_WAIT_TIME_SECONDS | Number of seconds to wait for the initial message poller read test to succeed on startup. |
| POLLER_TEST_TIMESTAMP_ACCURACY_SECONDS | How accurate the timestamp the initial message needs to be in seconds. |
| POLLER_NODE_FETCH_INTERVAL_SECONDS | How often to fetch the full node list from the RPC endpoint. |
| DECOMM_NOTIFICATION_FREQUENCY_SECONDS | The minimum amount of time between sending a decommission event notification for the same node. |