This project is a Flask-based Python project that facilitates keeping track of an Assassins game.
The Python scripts assume a VPS with a domain name tagged to it. A Telegram bot should also be created, and configured to receive webhooks. More information on webhooks can be found here. The code can also probably be reconfigured for long-polling if need be.
wsgi.py
-- Provides an entry point for running the app via WSGI, which provides faster speeds than just using Flask's inbuilt development server. uWSGI is a good alternative.assassins_web.py
-- Called bywsgi.py
, and is the main entry point for the app.admin_endpoints.py
provides a Web UI for the admins to access information and confirm keys.telegram.py
handles all Telegram-related APIs.users_endpoints.py
provides a Web UI for players to interact with.
-
You will need a Postgresql database set up. < Include the set up instructions here>
-
Install the required Python libraries:
$ pip install flask requests psycopg2 uwsgi
-
Clone the directory:
$ git clone https://github.com/tristonpang/capt-assassins-bot
-
cd
in:$ cd capt-assassins-bot
-
Start up a uWSGI server:
$ uwsgi --http :5000 --wsgi-file wsgi.py