diff options
| author | 2021-05-11 10:39:19 +0530 | |
|---|---|---|
| committer | 2021-10-11 12:05:42 +0530 | |
| commit | 23126ee86d2aa4d9357c41247faf46e1b2a8d138 (patch) | |
| tree | a2fa382bf12f56e5da0499c37496141098b66492 | |
| parent | (incidents):Log with error if webhook not found (diff) | |
Only process the first 10 message links
Diffstat (limited to '')
| -rw-r--r-- | bot/exts/moderation/incidents.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bot/exts/moderation/incidents.py b/bot/exts/moderation/incidents.py index 7d0984bd1..9ce892024 100644 --- a/bot/exts/moderation/incidents.py +++ b/bot/exts/moderation/incidents.py @@ -232,14 +232,12 @@ async def extract_message_links(message: discord.Message, bot: Bot) -> t.Optiona if message_links: embeds = [] - for message_link in message_links: + for message_link in message_links[:10]: ctx = await bot.get_context(message) embed = await make_message_link_embed(ctx, message_link[0]) if embed: embeds.append(embed) - return embeds[:10] - log.trace( f"Skipping discord message link detection on {message.id}: message doesn't qualify." ) |