Skip to content

Commit 01d300e

Browse files
committed
Add type-checking in cog scope.
1 parent 789ad95 commit 01d300e

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

discord_slash/cog_ext.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,11 @@ def cog_context_menu(*, name: str, guild_ids: list = None, target: int = 1):
205205
"""
206206

207207
def wrapper(cmd):
208-
# _obj = self.add_slash_command(
209-
# cmd,
210-
# name,
211-
# "",
212-
# guild_ids
213-
# )
214-
215-
# This has to call both, as its a arg-less menu.
208+
if name == "context":
209+
raise IncorrectFormat(
210+
"The name 'context' can not be used to register as a cog context menu,"
211+
"as this conflicts with this lib's checks. Please use a different name instead."
212+
)
216213

217214
_cmd = {
218215
"default_permission": None,

0 commit comments

Comments
 (0)