We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d42680f commit 1546ba6Copy full SHA for 1546ba6
bot/exts/utils/extensions.py
@@ -1,6 +1,5 @@
1
-import functools
2
import typing as t
3
-from enum import Enum
+from enum import Enum, member
4
5
from discord import Colour, Embed
6
from discord.ext import commands
@@ -23,10 +22,9 @@
23
22
class Action(Enum):
24
"""Represents an action to perform on an extension."""
25
26
- # Need to be partial otherwise they are considered to be function definitions.
27
- LOAD = functools.partial(Bot.load_extension)
28
- UNLOAD = functools.partial(Bot.unload_extension)
29
- RELOAD = functools.partial(Bot.reload_extension)
+ LOAD = member(Bot.load_extension)
+ UNLOAD = member(Bot.unload_extension)
+ RELOAD = member(Bot.reload_extension)
30
31
32
class Extensions(commands.Cog):
0 commit comments