DIscord upload added
This commit is contained in:
@@ -5,6 +5,9 @@ from datetime import datetime
|
|||||||
import sys
|
import sys
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
import os
|
import os
|
||||||
|
from discord_webhook import DiscordWebhook
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dirpath = "."
|
dirpath = "."
|
||||||
FILE = [filename for filename in os.listdir(dirpath) if filename.startswith("VFCZ_")]
|
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"])
|
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()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user