diff --git a/tmgdsp.py b/tmgdsp.py index e031efa..5ebc20a 100644 --- a/tmgdsp.py +++ b/tmgdsp.py @@ -2,6 +2,12 @@ import csv from datetime import datetime import sys import os +from discord_webhook import DiscordWebhook + + +webhook = DiscordWebhook( + url='https://discordapp.com/api/webhooks/744608404848246926/FwwWUNmuWsCetFDBOcA1trCx6nSflI0yX3f9BNh7-oB5a2VYSLl882di23XK2TNWwQxP', + username="billing vfgdsp") dirpath = "." FILE = [filename for filename in os.listdir(dirpath) if filename.startswith("TMGDSP_")] @@ -202,7 +208,10 @@ with open('output_TMGDSP_'+ext_date_from_filaname, 'w') as f: csvfile.close() +with open('output_TMGDSP_'+ext_date_from_filaname, "rb") as f: + webhook.add_file(file=f.read(), filename='output_TMGDSP_'+ext_date_from_filaname) +response = webhook.execute()