Skip to content

Commit 77f2b40

Browse files
authored
Add optional Description
This is specifically for context menus on_restart (by the IDE).
1 parent de7a8df commit 77f2b40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

discord_slash/model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class CommandData:
8282
def __init__(
8383
self,
8484
name,
85-
description,
85+
description=None,
8686
options=None,
8787
default_permission=True,
8888
id=None,
@@ -309,14 +309,14 @@ class CommandObject(CallbackObject):
309309
:ivar connector: Kwargs connector of the command.
310310
"""
311311

312-
def __init__(self, name, cmd, type): # Let's reuse old command formatting.
312+
def __init__(self, name, cmd, type=1): # Let's reuse old command formatting.
313313
super().__init__(cmd["func"])
314314
self.name = name.lower()
315315
self.description = cmd["description"]
316316
self.allowed_guild_ids = cmd["guild_ids"] or []
317317
self.options = cmd["api_options"] or []
318318
self.connector = cmd["connector"] or {}
319-
self.type = type or 1
319+
self.type = type
320320

321321

322322
class BaseCommandObject(CommandObject):

0 commit comments

Comments
 (0)