Compare commits
No commits in common. "d2b70dacd804d345c65ef5248938d83c087dd81c" and "ac3e09fb1983b318fd00a893ef775bd177e24399" have entirely different histories.
d2b70dacd8
...
ac3e09fb19
29
README.md
29
README.md
|
@ -1,30 +1,3 @@
|
||||||
# Questable
|
# Questable
|
||||||
|
|
||||||
A game-like To-Do List Telegram Bot.
|
A game-like To-Do List Telegram Bot
|
||||||
|
|
||||||
Source code for [Questable Bot](https://t.me/questable_bot) and the relevant
|
|
||||||
[API](https://api.questable.webionite.com/)
|
|
||||||
|
|
||||||
# Self Hosting
|
|
||||||
|
|
||||||
+ Clone the repository.
|
|
||||||
+ `git clone https://gitlab.com/questable/questable_bot.git`
|
|
||||||
+ `cd questable`
|
|
||||||
|
|
||||||
## Telegram Bot
|
|
||||||
|
|
||||||
+ Install the dependencies
|
|
||||||
+ `pip3 install python-telegram-bot`
|
|
||||||
+ Copy `sample.config.py` to `config.py` and edit it accordingly.
|
|
||||||
+ Run the bot
|
|
||||||
+ `python3 bot.py`
|
|
||||||
|
|
||||||
## Questable API Server
|
|
||||||
|
|
||||||
+ Install the dependencies
|
|
||||||
+ `pip3 install Flask`
|
|
||||||
+ Install `gunicorn`
|
|
||||||
+ `pip3 install gunicorn`
|
|
||||||
+ Run `gunicorn3 -b 127.0.0.1:5000 server:app`. Change port if you want to run
|
|
||||||
gunicorn on a different port.
|
|
||||||
+ Set up a reverse proxy from your webserver to `localhost:5000`.
|
|
8
bot.py
8
bot.py
|
@ -401,13 +401,9 @@ def tokens(bot, update):
|
||||||
reply_markup = telegram.ReplyKeyboardMarkup(custom_keyboard)
|
reply_markup = telegram.ReplyKeyboardMarkup(custom_keyboard)
|
||||||
reply_text = ("Tokens are used to authenticate external "
|
reply_text = ("Tokens are used to authenticate external "
|
||||||
"applications. This only provides access to "
|
"applications. This only provides access to "
|
||||||
"Questable data.\n"
|
"Questable data.")
|
||||||
"\nOfficial clients are:\n"
|
|
||||||
"[Questable CLI](https://gitlab.com/questable/questable-cli)"
|
|
||||||
)
|
|
||||||
bot.send_message(chat_id=update.message.chat_id, text=reply_text,
|
bot.send_message(chat_id=update.message.chat_id, text=reply_text,
|
||||||
reply_markup=reply_markup, parse_mode="markdown",
|
reply_markup=reply_markup)
|
||||||
disable_web_page_preview=True)
|
|
||||||
|
|
||||||
|
|
||||||
def add_token(bot, update, player):
|
def add_token(bot, update, player):
|
||||||
|
|
|
@ -9,7 +9,7 @@ class base_quest():
|
||||||
self.DB = db
|
self.DB = db
|
||||||
self.CHAT_ID = chat_id
|
self.CHAT_ID = chat_id
|
||||||
self.name = name
|
self.name = name
|
||||||
self.QID = int(qid)
|
self.QID = qid
|
||||||
self.imp = imp
|
self.imp = imp
|
||||||
self.diff = diff
|
self.diff = diff
|
||||||
self.state = state
|
self.state = state
|
||||||
|
|
Loading…
Reference in New Issue