Skip to content

Commit 89d38c0

Browse files
committed
Add guild_id parameter to GuildPermissionsData.
1 parent 8c39cec commit 89d38c0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

discord_slash/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ async def sync_all_commands(
362362
permissions_map[applicable_guild] = []
363363
permission = {
364364
"id": cmd_id,
365+
"guild_id": applicable_guild,
365366
"permissions": cmd_permissions[applicable_guild]
366367
}
367368
permissions_map[applicable_guild].append(permission)

discord_slash/model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,9 @@ class GuildPermissionsData:
413413
:ivar guild_id: Guild id that the permissions are in.
414414
:ivar permissions: List of permissions dict.
415415
"""
416-
def __init__(self, id, permissions, **kwargs):
416+
def __init__(self, id, guild_id, permissions, **kwargs):
417417
self.id = id
418+
self.guild_id = guild_id
418419
self.permissions = []
419420
if permissions:
420421
for permission in permissions:
@@ -424,6 +425,7 @@ def __eq__(self, other):
424425
if isinstance(other, GuildPermissionsData):
425426
return (
426427
self.id == other.id
428+
and self.guild_id == other.guild_id
427429
and self.permissions == other.permissions
428430
)
429431
else:

0 commit comments

Comments
 (0)