mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-18 15:52:10 +00:00
test
This commit is contained in:
@@ -286,7 +286,6 @@ logger.info("Creating discord bot")
|
|||||||
client = commands.Bot(intents=intents, command_prefix="$")
|
client = commands.Bot(intents=intents, command_prefix="$")
|
||||||
logger.info("Done")
|
logger.info("Done")
|
||||||
logger.info("Creating flask app")
|
logger.info("Creating flask app")
|
||||||
app = Flask(__name__)
|
|
||||||
logger.info("Done")
|
logger.info("Done")
|
||||||
|
|
||||||
|
|
||||||
@@ -2213,6 +2212,15 @@ async def krecimy_pornola(ctx):
|
|||||||
else:
|
else:
|
||||||
ctx.reply("Jak ładnie szefa poprosisz.")
|
ctx.reply("Jak ładnie szefa poprosisz.")
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
@app.route("/mp3", methods=["GET"])
|
||||||
|
def get_music_list():
|
||||||
|
"""
|
||||||
|
The function `get_music_list` returns a JSON object containing a list of music files.
|
||||||
|
:return: A JSON response containing a key "music_file_list" with the value of the variable
|
||||||
|
`music_file_list`.
|
||||||
|
"""
|
||||||
|
return jsonify({"music_file_list": MASTER_TIMEOUT})
|
||||||
|
|
||||||
@app.route("/conjurer", methods=["GET"])
|
@app.route("/conjurer", methods=["GET"])
|
||||||
def answer_external_command():
|
def answer_external_command():
|
||||||
@@ -2249,7 +2257,7 @@ def waitress_run(_logger):
|
|||||||
|
|
||||||
# *================================== Run
|
# *================================== Run
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# TODO: wpakowac kondzia w wąteki odpalic asynchronicznie rownolegle z flaskiem do sterowania nim
|
# TODO: wpakowac kondzia w wątki odpalic asynchronicznie rownolegle z flaskiem do sterowania nim
|
||||||
logger.info("Starting discord bot")
|
logger.info("Starting discord bot")
|
||||||
threads = []
|
threads = []
|
||||||
t1 = threading.Thread(target=client.run, args=(TOKEN,))
|
t1 = threading.Thread(target=client.run, args=(TOKEN,))
|
||||||
|
|||||||
Reference in New Issue
Block a user