Skip to content

Commit f5baaeb

Browse files
authored
Merge pull request #197 from benwoo1110/default-permission-missing
Fix issue where default_permission doesn't get updated on sync.
2 parents af5c23e + 70ccac3 commit f5baaeb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

discord_slash/model.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,18 @@ class CommandData:
7070
7171
:ivar name: Name of the command.
7272
:ivar description: Description of the command.
73+
:ivar default_permission: Indicates whether users should have permissions to run this command by default.
7374
:ivar options: List of :class:`OptionData`.
7475
:ivar id: Command id, this is received from discord so may not be present
7576
:ivar application_id: The application id of the bot, required only when the application id and bot id are different. (old bots)
7677
"""
7778

7879
def __init__(
79-
self, name, description, options=None, id=None, application_id=None, version=None, **kwargs
80+
self, name, description, options=None, default_permission=True, id=None, application_id=None, version=None, **kwargs
8081
):
8182
self.name = name
8283
self.description = description
84+
self.default_permission = default_permission
8385
self.id = id
8486
self.application_id = application_id
8587
self.version = version
@@ -96,6 +98,7 @@ def __eq__(self, other):
9698
self.name == other.name
9799
and self.description == other.description
98100
and self.options == other.options
101+
and self.default_permission == other.default_permission
99102
)
100103
else:
101104
return False

0 commit comments

Comments
 (0)