aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2021-03-09 20:27:52 +0100
committerGravatar kwzrd <[email protected]>2021-03-13 12:39:41 +0100
commit65f3dd35ec7eca6160691c5cc339ba9462941c47 (patch)
treefd1b9abeec942bbe35487e361abcfd90941f272b
parentBranding: remove current implementation (diff)
Branding: initiate repository abstraction
-rw-r--r--bot/exts/backend/branding/_cog.py3
-rw-r--r--bot/exts/backend/branding/_repository.py12
2 files changed, 15 insertions, 0 deletions
diff --git a/bot/exts/backend/branding/_cog.py b/bot/exts/backend/branding/_cog.py
index afe575e1a..cef17a614 100644
--- a/bot/exts/backend/branding/_cog.py
+++ b/bot/exts/backend/branding/_cog.py
@@ -3,6 +3,7 @@ import logging
from discord.ext import commands
from bot.bot import Bot
+from bot.exts.backend.branding._repository import BrandingRepository
log = logging.getLogger(__name__)
@@ -11,4 +12,6 @@ class Branding(commands.Cog):
"""Guild branding management."""
def __init__(self, bot: Bot) -> None:
+ """Instantiate repository abstraction."""
self.bot = bot
+ self.repository = BrandingRepository(bot)
diff --git a/bot/exts/backend/branding/_repository.py b/bot/exts/backend/branding/_repository.py
new file mode 100644
index 000000000..de47fcd36
--- /dev/null
+++ b/bot/exts/backend/branding/_repository.py
@@ -0,0 +1,12 @@
+import logging
+
+from bot.bot import Bot
+
+log = logging.getLogger(__name__)
+
+
+class BrandingRepository:
+ """Abstraction exposing the branding repository via convenient methods."""
+
+ def __init__(self, bot: Bot) -> None:
+ self.bot = bot