diff --git a/interactions/client/bot.py b/interactions/client/bot.py index f615b2682..7f4456220 100644 --- a/interactions/client/bot.py +++ b/interactions/client/bot.py @@ -694,6 +694,9 @@ async def __sync(self) -> None: # sourcery no-metrics if _guild_id in __blocked_guilds: log.fatal(f"Cannot sync commands on guild with id {_guild_id}!") raise LibraryException(50001, message="Missing Access |") + if _guild_id not in _guild_ids: + log.warning(f"The bot is not in guild with id {_guild_id}") + raise LibraryException(50001, message="Missing Access |") if _guild_command["name"] not in __check_guild_commands[_guild_id]: self.__guild_commands[_guild_id]["clean"] = False self.__guild_commands[_guild_id]["commands"].append(_guild_command)