Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite for persistence and more #107

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# config
config
start

# PyCharm config
.idea
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Secret Hitler: Telegram
# Secret Hitler Bot for Telegram

**A Telegram bot that allows users to play [Secret Hitler](https://www.secrethitler.com/).**

Expand Down Expand Up @@ -26,6 +26,6 @@ To get the bot working, you need to create the folder `config` and place these f

## License and Attribution

Secret Hitler is designed by Max Temkin, Mike Boxleiter, Tommy Maranges and illustrated by Mackenzie Schubert.
[Secret Hitler](https://www.secrethitler.com/) was designed by Max Temkin, Mike Boxleiter, Tommy Maranges and illustrated by Mackenzie Schubert.

The game and therefore this bot as well are licensed as per the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-nc-sa/4.0/) license.
The game and therefore this bot are licensed as per the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-nc-sa/4.0/) license.
17 changes: 17 additions & 0 deletions db_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from model import *
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker

engine = create_engine('sqlite:///:memory:', echo=True)
Base.metadata.create_all(engine)
Session = sessionmaker(bind=engine)
session = Session()

test_game = Game(chat_id=123)
session.add(test_game)
test_player = Player(name="Richard", game=test_game)
session.add(test_player)

#print(session.query(Player).filter_by(name="Richard").first())

session.commit()
9 changes: 0 additions & 9 deletions game_peek.py

This file was deleted.

3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
telegram
python-telegram-bot
sqlalchemy
Loading