diff --git a/interactions/client.py b/interactions/client.py index 146c619d6..97c3efd4b 100644 --- a/interactions/client.py +++ b/interactions/client.py @@ -98,6 +98,11 @@ def __init__( data = self._loop.run_until_complete(self._http.get_current_bot_information()) self.me = Application(**data) + @property + def guilds(self) -> List[Guild]: + """Returns a list of guilds the bot is in.""" + return [Guild(**_, _client=self._http) for _ in self._http.cache.self_guilds.view] + @property def latency(self) -> float: """Returns the connection latency in milliseconds.""" diff --git a/interactions/client.pyi b/interactions/client.pyi index 11e22dd9f..447e0f4e6 100644 --- a/interactions/client.pyi +++ b/interactions/client.pyi @@ -35,6 +35,8 @@ class Client: **kwargs, ) -> None: ... @property + def guilds(self) -> List[Guild]: ... + @property def latency(self) -> float: ... def start(self) -> None: ... def __register_events(self) -> None: ...