From: Roland Häder Date: Wed, 24 May 2023 12:20:20 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2e98932e98f14b9373234d77037b55f61902d0a4;p=fba.git Continued: - reformatted, I tried to use post_json_api() for bot postings --- diff --git a/fba.py b/fba.py index 1eeb75b..3042952 100644 --- a/fba.py +++ b/fba.py @@ -581,9 +581,16 @@ def send_bot_post(instance: str, blocks: dict): botheaders = {**headers, **{"Authorization": "Bearer " + config["bot_token"]}} - req = reqto.post(f"{config['bot_instance']}/api/v1/statuses", - data={"status":message, "visibility":config['bot_visibility'], "content_type":"text/plain"}, - headers=botheaders, timeout=10).json() + req = reqto.post( + f"{config['bot_instance']}/api/v1/statuses", + data={ + "status" : message, + "visibility" : config['bot_visibility'], + "content_type": "text/plain" + }, + headers=botheaders, + timeout=10 + ).json() return True