diff options
author | 2025-04-19 11:44:03 +0100 | |
---|---|---|
committer | 2025-04-19 11:44:03 +0100 | |
commit | 1bb852d61b9828e19fbfc95c71b05e6670bb8da4 (patch) | |
tree | 48acca4a11f5b28265a7a6b39236b873bc3977a8 /bot/exts/core/extensions.py | |
parent | Fix emoji replacement in UwU cog (#1634) (diff) | |
parent | Update project to Python 3.13 (diff) |
Merge pull request #1670 from python-discord/python-313-upgrade
Update sir-lancebot to Python 3.13
Diffstat (limited to 'bot/exts/core/extensions.py')
-rw-r--r-- | bot/exts/core/extensions.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bot/exts/core/extensions.py b/bot/exts/core/extensions.py index 24a28e2b..d8cb6f0c 100644 --- a/bot/exts/core/extensions.py +++ b/bot/exts/core/extensions.py @@ -1,6 +1,5 @@ -import functools from collections.abc import Mapping -from enum import Enum +from enum import Enum, member from discord import Colour, Embed from discord.ext import commands @@ -24,10 +23,9 @@ BASE_PATH_LEN = len(exts.__name__.split(".")) class Action(Enum): """Represents an action to perform on an extension.""" - # Need to be partial otherwise they are considered to be function definitions. - LOAD = functools.partial(Bot.load_extension) - UNLOAD = functools.partial(Bot.unload_extension) - RELOAD = functools.partial(Bot.reload_extension) + LOAD = member(Bot.load_extension) + UNLOAD = member(Bot.unload_extension) + RELOAD = member(Bot.reload_extension) class Extension(commands.Converter): |