diff options
author | 2023-04-07 18:27:03 +0100 | |
---|---|---|
committer | 2023-04-07 18:27:03 +0100 | |
commit | 69229036a07792388bf7fc4e83a6321437e61dc6 (patch) | |
tree | 09533f668f8b31c91a3df88571d69a2edea467f0 | |
parent | Merge pull request #2516 from python-discord/infr_emoji (diff) | |
parent | Correct log upload (diff) |
Merge pull request #2519 from python-discord/fix_modlog
Correct log upload
-rw-r--r-- | bot/utils/messages.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/utils/messages.py b/bot/utils/messages.py index 8d765ebfc..a8c2b95f1 100644 --- a/bot/utils/messages.py +++ b/bot/utils/messages.py @@ -5,6 +5,7 @@ from collections.abc import Iterable from datetime import datetime, timezone from functools import partial from io import BytesIO +from itertools import zip_longest from typing import Callable, List, Optional, Sequence, Union import discord @@ -276,7 +277,7 @@ async def upload_log(messages: Iterable[Message], actor_id: int, attachments: di "embeds": [embed.to_dict() for embed in message.embeds], "attachments": attachment, } - for message, attachment in zip(messages, attachments) + for message, attachment in zip_longest(messages, attachments, fillvalue=[]) ] try: |