aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2019-10-03 13:18:32 -0700
committerGravatar MarkKoz <[email protected]>2019-10-03 15:08:54 -0700
commit4f75160a8a66861eb92a0da97c1bc4ffca86402e (patch)
tree475482e8e1da5f6389059410366e707297a0dec1
parentRename the "cogs" extension & cog to "extensions" (diff)
Add enum for extension actions
-rw-r--r--bot/cogs/extensions.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/bot/cogs/extensions.py b/bot/cogs/extensions.py
index 612a5aad2..10f4d38e3 100644
--- a/bot/cogs/extensions.py
+++ b/bot/cogs/extensions.py
@@ -1,5 +1,6 @@
import logging
import os
+from enum import Enum
from discord import Colour, Embed
from discord.ext.commands import Bot, Cog, Context, group
@@ -15,6 +16,14 @@ log = logging.getLogger(__name__)
KEEP_LOADED = ["bot.cogs.extensions", "bot.cogs.modlog"]
+class Action(Enum):
+ """Represents an action to perform on an extension."""
+
+ LOAD = (Bot.load_extension,)
+ UNLOAD = (Bot.unload_extension,)
+ RELOAD = (Bot.unload_extension, Bot.load_extension)
+
+
class Extensions(Cog):
"""Extension management commands."""