fix: warn for no app cmd scope for disable_sync
@@ -460,13 +460,13 @@ class Client:
# responsible for checking if a command is in the cache but not a coro -> allowing removal
for _id in _guild_ids:
+ try:
_cmds = await self._http.get_application_commands(
application_id=self.me.id, guild_id=_id, with_localizations=True
)
-
- if isinstance(_cmds, dict) and _cmds.get("code"):
- if int(_cmds.get("code")) != 50001:
- raise LibraryException(_cmds["code"], message=f'{_cmds["message"]} |')
+ except LibraryException as e:
+ if int(e.code) != 50001:
+ raise LibraryException(code=e.code, message=e.message)
log.warning(
f"Your bot is missing access to guild with corresponding id {_id}! "
