From 8520e44e618d674c33e4df76a2ba6d2e2c2dfdd9 Mon Sep 17 00:00:00 2001 From: Rafael Ameijeiras Date: Tue, 13 Jul 2021 13:38:09 +0200 Subject: [PATCH] remove file name from the message --- .../telegram-bot-cli/pandora-telegram-cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_plugins/message_app_connectors/telegram-bot-cli/pandora-telegram-cli.py b/pandora_plugins/message_app_connectors/telegram-bot-cli/pandora-telegram-cli.py index f733add6ae..8ee7520355 100644 --- a/pandora_plugins/message_app_connectors/telegram-bot-cli/pandora-telegram-cli.py +++ b/pandora_plugins/message_app_connectors/telegram-bot-cli/pandora-telegram-cli.py @@ -132,6 +132,8 @@ def sendMedia(mssg, chatId, token, filepath): print(r) # Parse api config +filecap=None + if args.api_conf : api = parse_api_conf(args.api_conf) # Parse graph config @@ -155,14 +157,12 @@ if args.api_conf : if filename is not None: filecap=f"graph_{graph_cfg['module_id']}.{datetime.now().strftime('%s')}.png" - else: - filecap=None # Send message send(mssg=args.message, chatId=args.chat_id, token=args.token) if filecap is not None: - sendMedia(mssg=filecap, chatId=args.chat_id, token=args.token, filepath=filename) + sendMedia(mssg='', chatId=args.chat_id, token=args.token, filepath=filename) try: os.remove(filename) except Exception as e: