fix bad bug #5

main
Jan Beníček 2024-06-20 17:38:29 +02:00
parent 0d7bee8ea8
commit ff57a43de3
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)