diff --git a/cogs/backup.py b/cogs/backup.py index 1079fc0..df9ca60 100644 --- a/cogs/backup.py +++ b/cogs/backup.py @@ -33,7 +33,6 @@ BACKUP_TIME = dtime(hour=4, tzinfo=TIMEZONE) MAX_FILE_BYTES = 10 * 1024 * 1024 # limite d'un fichier envoyé par webhook -WEBHOOK_NAME = "BotDiff Sauvegardes" @dataclass(frozen=True) @@ -128,7 +127,6 @@ async def send_backup(self, reason: str) -> bool: await webhook.send( backup_message(backup, reason), file=discord.File(io.BytesIO(backup.data), filename=backup.filename), - username=WEBHOOK_NAME, allowed_mentions=discord.AllowedMentions.none(), ) except (discord.HTTPException, ValueError) as exc: diff --git a/tests/test_backup.py b/tests/test_backup.py index 1294dac..7b4378a 100644 --- a/tests/test_backup.py +++ b/tests/test_backup.py @@ -67,7 +67,7 @@ async def test_envoi_dans_le_salon(tracked_bot, webhook) -> None: assert webhook.urls == [WEBHOOK] assert sent["content"].startswith("💾 **Sauvegarde quotidienne** · 2 joueur(s) suivi(s) sur 1 serveur(s)") assert sent["file"].filename.endswith(".db.gz") - assert sent["username"] == "BotDiff Sauvegardes" + assert "username" not in sent # nom et avatar : ceux du webhook, réglés dans Discord async def test_une_seule_sauvegarde_au_demarrage(tracked_bot, webhook) -> None: