🚚 Make session persistent
All checks were successful
ci / docker (push) Successful in 4m38s
Python formatting PEP8 / Python-PEP8 (push) Successful in 17s

This commit is contained in:
Finn Christiansen 2024-06-14 21:25:46 +02:00
parent 9eb1a75baf
commit d6792c91a8
3 changed files with 8 additions and 1 deletions

View file

@ -8,3 +8,5 @@ services:
- BOT_HOMESERVER
- BOT_USERNAME
- BOT_PASSWORD
volumes:
- ./data/:/bot/data

4
data/.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

View file

@ -12,7 +12,8 @@ load_dotenv()
creds = botlib.Creds(
os.getenv("BOT_HOMESERVER"),
os.getenv("BOT_USERNAME"),
os.getenv("BOT_PASSWORD")
os.getenv("BOT_PASSWORD"),
session_stored_file="data/session.txt"
)
bot = botlib.Bot(creds)