-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e56b572
commit b47f9b8
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
POLLING_INTERVAL=60 | ||
HISTORY_INTERVAL=125 | ||
GET_LAB_STATE_ENDPOINT=http://presence.hlcs.it/gates/internal/ | ||
GET_LAB_HISTORY_ENDPOINT=http://presence.hlcs.it/requests/internal/ | ||
RUST_LOG=trace | ||
RUST_LOG=info | ||
CHRONO_TIME_OFFSET="+02:00" | ||
TELOXIDE_TOKEN="6039572435:AAHg8t2WF94y4-j-Rik-YDA4yBKERHEwt4w" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
POLLING_INTERVAL=60 | ||
HISTORY_INTERVAL=125 | ||
GET_LAB_STATE_ENDPOINT= | ||
GET_LAB_HISTORY_ENDPOINT= | ||
RUST_LOG=info | ||
CHRONO_TIME_OFFSET="+02:00" | ||
TELOXIDE_TOKEN="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Presence Telegram Bot (RS version) | ||
=== | ||
A Bot telegram for checking the status of door of the hacklab | ||
|
||
|
||
For use it copy the file .env.example to .env | ||
|
||
and set the .env vars: | ||
|
||
- TELOXIDE_TOKEN , API tokey generated by the @BotFather | ||
|
||
- POLLING_INTERVAL default 60 seconds | ||
|
||
- HISTORY_INTERVAL default 125 seconds | ||
|
||
- GET_LAB_STATE_ENDPOINT, the endpoint for get the state of the lab | ||
|
||
- GET_LAB_HISTORY_ENDPOINT, the endpoint for get the history of opens of the lab | ||
|
||
- RUST_LOG=info, the log level of the bot (trace, debug, info, warn, error) | ||
- CHRONO_TIME_OFFSET="+02:00", the offset of the time zone of the lab, default +02:00 (Italy, Rome), for other time zone see https://docs.rs/chrono/latest/chrono/offset/struct.FixedOffset.html | ||
and for start it run the command docker-compose up -d |