discord implementation
This commit is contained in:
@@ -2,6 +2,12 @@ import csv
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
from discord_webhook import DiscordWebhook
|
||||||
|
|
||||||
|
|
||||||
|
webhook = DiscordWebhook(
|
||||||
|
url='https://discordapp.com/api/webhooks/744608404848246926/FwwWUNmuWsCetFDBOcA1trCx6nSflI0yX3f9BNh7-oB5a2VYSLl882di23XK2TNWwQxP',
|
||||||
|
username="billing vfgdsp")
|
||||||
|
|
||||||
dirpath = "."
|
dirpath = "."
|
||||||
FILE = [filename for filename in os.listdir(dirpath) if filename.startswith("TMGDSP_")]
|
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()
|
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()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user