aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-06-03 15:01:55 +0400
committerGravatar Hassan Abouelela <[email protected]>2022-06-03 15:01:55 +0400
commit90c342921e02abfe2b12156ea16542151301a27a (patch)
tree734228398d74c62aedb807fab62eeaaa29d2b98d
parentMerge branch 'main' into multiple-banners (diff)
Use MappingProxyType For Asset Map
Signed-off-by: Hassan Abouelela <[email protected]>
-rw-r--r--bot/exts/backend/branding/_cog.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/exts/backend/branding/_cog.py b/bot/exts/backend/branding/_cog.py
index a57cc8623..e5781f76d 100644
--- a/bot/exts/backend/branding/_cog.py
+++ b/bot/exts/backend/branding/_cog.py
@@ -1,6 +1,7 @@
import asyncio
import contextlib
import random
+import types
import typing as t
from datetime import timedelta
from enum import Enum
@@ -120,10 +121,10 @@ class Branding(commands.Cog):
# asset has been used in the current rotation.
_cache_icons = RedisCache()
_cache_banners = RedisCache()
- asset_caches = {
+ asset_caches = types.MappingProxyType({
AssetType.ICON: _cache_icons,
AssetType.BANNER: _cache_banners
- }
+ })
# All available event names & durations. Cached by the daemon nightly; read by the calendar command.
cache_events = RedisCache()