@@ -860,15 +860,11 @@ async def _sync_application_commands(self) -> None:
860
860
# Sort all invokable commands between guild IDs:
861
861
global_cmds , guild_cmds = self ._ordered_unsynced_commands (self ._test_guilds )
862
862
863
- if global_cmds is not None and self . _command_sync . global_commands :
863
+ if global_cmds is not None :
864
864
# Update global commands first
865
865
diff = _app_commands_diff (
866
866
global_cmds , self ._connection ._global_application_commands .values ()
867
867
)
868
- if not self ._command_sync .allow_command_deletion :
869
- # because allow_command_deletion is disabled, we want to never delete a command, so we move the delete commands to no_changes
870
- diff ["no_changes" ] += diff ["delete" ]
871
- diff ["delete" ].clear ()
872
868
update_required = bool (diff ["upsert" ]) or bool (diff ["edit" ]) or bool (diff ["delete" ])
873
869
874
870
# Show the difference
@@ -889,14 +885,10 @@ async def _sync_application_commands(self) -> None:
889
885
# Same process but for each specified guild individually.
890
886
# Notice that we're not doing this for every single guild for optimisation purposes.
891
887
# See the note in :meth:`_cache_application_commands` about guild app commands.
892
- if guild_cmds is not None and self . _command_sync . guild_commands :
888
+ if guild_cmds is not None :
893
889
for guild_id , cmds in guild_cmds .items ():
894
890
current_guild_cmds = self ._connection ._guild_application_commands .get (guild_id , {})
895
891
diff = _app_commands_diff (cmds , current_guild_cmds .values ())
896
- if not self ._command_sync .allow_command_deletion :
897
- # because allow_command_deletion is disabled, we want to never delete a command, so we move the delete commands to no_changes
898
- diff ["no_changes" ] += diff ["delete" ]
899
- diff ["delete" ].clear ()
900
892
update_required = bool (diff ["upsert" ]) or bool (diff ["edit" ]) or bool (diff ["delete" ])
901
893
902
894
# Show diff
0 commit comments