aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Shivansh-007 <[email protected]>2021-04-17 08:48:33 +0530
committerGravatar Shivansh-007 <[email protected]>2021-10-11 12:05:33 +0530
commit5406c45a08ba0532b10cc6609f1f54a9f0e80e3d (patch)
tree1cd0caffa07e58eb52f7c411146cda4f6c87fc35
parentRefactors code. (diff)
Updates type hints for `message_link_embeds_cache`.
-rw-r--r--bot/exts/moderation/incidents.py8
1 files changed, 7 insertions, 1 deletions
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: