File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 45
45
46
46
from .client import Client
47
47
from .shard import AutoShardedClient
48
- from .utils import MISSING , get , async_all
48
+ from .utils import MISSING , get , find , async_all
49
49
from .commands import (
50
50
SlashCommand ,
51
51
SlashCommandGroup ,
@@ -189,7 +189,7 @@ async def register_commands(self) -> None:
189
189
cmd = get (
190
190
self .pending_application_commands ,
191
191
name = i ["name" ],
192
- description = i [ "description" ] ,
192
+ guild_ids = None ,
193
193
type = i ["type" ],
194
194
)
195
195
self .application_commands [i ["id" ]] = cmd
@@ -225,12 +225,7 @@ async def register_commands(self) -> None:
225
225
raise
226
226
else :
227
227
for i in cmds :
228
- cmd = get (
229
- self .pending_application_commands ,
230
- name = i ["name" ],
231
- description = i ["description" ],
232
- type = i ["type" ],
233
- )
228
+ cmd = find (lambda cmd : cmd .name == i ["name" ] and cmd .type == i ["type" ] and int (i ["guild_id" ]) in cmd .guild_ids , self .pending_application_commands )
234
229
self .application_commands [i ["id" ]] = cmd
235
230
236
231
# Permissions
You can’t perform that action at this time.
0 commit comments