fix bad bug #5
parent
0d7bee8ea8
commit
ff57a43de3
|
@ -2,5 +2,5 @@ import discordwebhook, datetime
|
|||
|
||||
def send_url_to_discord(webhook_url: str, backup_url: str, datetim: datetime.datetime, backup_name: str):
|
||||
webhook = discordwebhook.Webhook(url=webhook_url)
|
||||
embed = discordwebhook.Embed(title=f"Backup of {backup_name} from {datetim.strftime("%Y-%m-%d")}", description=backup_url)
|
||||
embed = discordwebhook.Embed(title=f"Backup of {backup_name} from {str(datetim.year)}-{str(datetim.month)}-{str(datetim.day)}", description=backup_url)
|
||||
webhook.send_sync(content="", embed=embed)
|
|
@ -17,5 +17,5 @@ print("------------------")
|
|||
backup_local_path = fileDownloader.create_dirs_and_download(backup_url=backup_url, date=datetime.datetime.now(), base_path=conf.save_dir)
|
||||
|
||||
if conf.discord_enabled == 1:
|
||||
discordPoster.send_url_to_discord(webhook_url=conf.discord_webhook, backup_url=backup_url, datetim=datetime.datetime.now, backup_name=conf.discord_backupname)
|
||||
discordPoster.send_url_to_discord(webhook_url=conf.discord_webhook, backup_url=backup_url, datetim=datetime.datetime.now(), backup_name=conf.discord_backupname)
|
||||
|
||||
|
|
Loading…
Reference in New Issue