mirror of
https://gitlab.com/questable/questable_bot
synced 2025-12-03 12:40:06 +01:00
Compare commits
2 Commits
d2b70dacd8
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 6116594eb4 | |||
| 1f0a05ca9d |
@@ -22,7 +22,7 @@ Source code for [Questable Bot](https://t.me/questable_bot) and the relevant
|
||||
## Questable API Server
|
||||
|
||||
+ Install the dependencies
|
||||
+ `pip3 install Flask`
|
||||
+ `pip3 install Flask flask_cors`
|
||||
+ Install `gunicorn`
|
||||
+ `pip3 install gunicorn`
|
||||
+ Run `gunicorn3 -b 127.0.0.1:5000 server:app`. Change port if you want to run
|
||||
|
||||
6
bot.py
6
bot.py
@@ -631,7 +631,7 @@ with open('schema.sql') as f:
|
||||
cursor.executescript(f.read())
|
||||
db.commit()
|
||||
|
||||
updater = Updater(token=config.api_key)
|
||||
updater = Updater(token=config.api_key, use_context=False)
|
||||
dispatcher = updater.dispatcher
|
||||
|
||||
dispatcher.add_handler(CommandHandler('start', start))
|
||||
@@ -642,12 +642,12 @@ dispatcher.add_handler(CommandHandler('cancel', lambda x, y: me_handler(x, y,
|
||||
db)))
|
||||
dispatcher.add_handler(CommandHandler('help', lambda x, y: help_command(x, y,
|
||||
db)))
|
||||
dispatcher.add_handler(MessageHandler(Filters.text, lambda x, y:
|
||||
message_handling(x, y, db)))
|
||||
dispatcher.add_handler(RegexHandler(r"/[Ss]?[Qq]_\d+", lambda x, y:
|
||||
quest_handling(x, y, db)))
|
||||
dispatcher.add_handler(MessageHandler(Filters.command, lambda x, y:
|
||||
message_handling(x, y, db)))
|
||||
dispatcher.add_handler(MessageHandler(Filters.text, lambda x, y:
|
||||
message_handling(x, y, db)))
|
||||
|
||||
if config.update_method == "polling":
|
||||
updater.start_polling()
|
||||
|
||||
Reference in New Issue
Block a user