Skip to content

Commit 9270d3c

Browse files
GeomKidFayeDel
andauthored
fix: Warns user that the bot is not in guild than rather fails (#1220)
Co-authored-by: DeltaX <33706469+DeltaXWizard@users.noreply.github.com>
1 parent f26dfd3 commit 9270d3c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

interactions/client/bot.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,9 @@ async def __sync(self) -> None: # sourcery no-metrics
694694
if _guild_id in __blocked_guilds:
695695
log.fatal(f"Cannot sync commands on guild with id {_guild_id}!")
696696
raise LibraryException(50001, message="Missing Access |")
697+
if _guild_id not in _guild_ids:
698+
log.warning(f"The bot is not in guild with id {_guild_id}")
699+
raise LibraryException(50001, message="Missing Access |")
697700
if _guild_command["name"] not in __check_guild_commands[_guild_id]:
698701
self.__guild_commands[_guild_id]["clean"] = False
699702
self.__guild_commands[_guild_id]["commands"].append(_guild_command)

0 commit comments

Comments
 (0)