Skip to content

Commit 4e8b396

Browse files
faluhubLulalabykrittick
authored
Fixed type mismatch in sync_commands (#925)
Co-authored-by: Lala Sabathil <[email protected]> Co-authored-by: krittick <[email protected]>
1 parent 7fbd75f commit 4e8b396

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

discord/bot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,8 @@ async def sync_commands(
576576
guild_permissions: List = []
577577

578578
for i in commands:
579-
cmd = find(lambda cmd: cmd.name == i["name"] and cmd.type == i["type"] and cmd.guild_ids is not None
580-
and (i["guild_id"]) in cmd.guild_ids, self.pending_application_commands)
579+
cmd = find(lambda cmd: cmd.name == i["name"] and str(cmd.type) == str(i["type"]) and cmd.guild_ids is not None
580+
and int(i["guild_id"]) in cmd.guild_ids, self.pending_application_commands)
581581
if not cmd:
582582
# command has not been added yet
583583
continue

0 commit comments

Comments
 (0)