Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions interactions/client/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,13 +460,13 @@ async def __get_all_commands(self) -> None:
# responsible for checking if a command is in the cache but not a coro -> allowing removal

for _id in _guild_ids:
_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"]} |')
try:
_cmds = await self._http.get_application_commands(
application_id=self.me.id, guild_id=_id, with_localizations=True
)
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}! "
Expand Down