From 5406c45a08ba0532b10cc6609f1f54a9f0e80e3d Mon Sep 17 00:00:00 2001 From: Shivansh-007 Date: Sat, 17 Apr 2021 08:48:33 +0530 Subject: Updates type hints for `message_link_embeds_cache`. --- bot/exts/moderation/incidents.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bot/exts/moderation/incidents.py b/bot/exts/moderation/incidents.py index 77017659e..a5e2ef945 100644 --- a/bot/exts/moderation/incidents.py +++ b/bot/exts/moderation/incidents.py @@ -269,7 +269,13 @@ class Incidents(Cog): """ # This dictionary maps a incident message to the message link embeds(s) sent by it - # RedisCache[discord.Message.id, List[discord.Message.id]] + # + # Discord doesn't allow more than 10 embeds to be sent in a single webhook message + # hence the embeds need to be broken into groups of 10. Since we have multiple embeds + # and RedisCache doesn't allow storing lists, we need to join the list with commas to + # make it a string and then store it. + # + # RedisCache[discord.Message.id, str] message_link_embeds_cache = RedisCache() def __init__(self, bot: Bot) -> None: -- cgit v1.2.3