mirror of
https://github.com/andwati/unsplash-bot.git
synced 2026-12-04 07:18:47 +00:00
webhook docstring
This commit is contained in:
@@ -15,6 +15,9 @@ def index():
|
|||||||
|
|
||||||
@app.route(WEBHOOK_URL_PATH, methods=["GET"])
|
@app.route(WEBHOOK_URL_PATH, methods=["GET"])
|
||||||
def webhook():
|
def webhook():
|
||||||
|
"""
|
||||||
|
sets the bot webhook
|
||||||
|
"""
|
||||||
if flask.request.headers.get("content-type") == "application/json":
|
if flask.request.headers.get("content-type") == "application/json":
|
||||||
json_string = flask.request.get_data().decode("utf-8")
|
json_string = flask.request.get_data().decode("utf-8")
|
||||||
update = telebot.types.Update.de_json(json_string)
|
update = telebot.types.Update.de_json(json_string)
|
||||||
|
|||||||
Reference in New Issue
Block a user