DIscord upload added

This commit is contained in:
Jakub Žáček 2022-04-20 09:18:48 +02:00
parent 5314fb1d2b
commit 94d17f78ef

View File

@ -5,6 +5,9 @@ from datetime import datetime
import sys
from pprint import pprint
import os
from discord_webhook import DiscordWebhook
dirpath = "."
FILE = [filename for filename in os.listdir(dirpath) if filename.startswith("VFCZ_")]
@ -164,7 +167,10 @@ with open('output_VFCZ_'+ext_date_from_filaname, 'w') as f:
writer.writerow([key, "N/A", "N/A", data, dataamount, sms, smscount, other, "N/A"])
with open('output_VFCZ_'+ext_date_from_filaname, "rb") as f:
webhook.add_file(file=f.read(), filename='output_VFCZ_'+ext_date_from_filaname)
response = webhook.execute()