diff --git a/ferris/__init__.py b/ferris/__init__.py index 59308ed..61feddd 100644 --- a/ferris/__init__.py +++ b/ferris/__init__.py @@ -1,5 +1,5 @@ __author__ = 'Cryptex & jay3332' -__version__ = '0.0a1.dev3' +__version__ = '0.0a1.post0' # 0.1.0 for the finished release diff --git a/ferris/base.py b/ferris/base.py index 2cb1715..e3e4afa 100644 --- a/ferris/base.py +++ b/ferris/base.py @@ -19,18 +19,18 @@ class SnowflakeObject(ABC): """An abstract base class representing objects that have a snowflake ID.""" - __slots__ = ('__id',) + __slots__ = ('_id',) def __init__(self, /) -> None: - self.__id: int = None + self._id: int = None def _store_snowflake(self, id: Snowflake, /) -> None: - self.__id = id + self._id = id @property def id(self, /) -> int: """int: The snowflake ID of this object.""" - return self.__id + return self._id class BaseObject(SnowflakeObject, ABC): diff --git a/ferris/channel.py b/ferris/channel.py index 7c9d1a4..f2f2780 100644 --- a/ferris/channel.py +++ b/ferris/channel.py @@ -22,7 +22,6 @@ class Channel(BaseObject): def __init__(self, connection: Connection, data: Data, /) -> None: self._connection: Connection = connection self._process_data(data) - super().__init__() def _process_data(self, data: Data, /) -> None: self._store_snowflake(cast(int, data.get('id'))) diff --git a/ferris/client.py b/ferris/client.py index 5a2ac59..5d62bd2 100644 --- a/ferris/client.py +++ b/ferris/client.py @@ -203,7 +203,7 @@ async def fetch_guild( A guild with the given ID was not found. """ g = await self._connection.api.guilds(id).get( - params={'members': fetch_members, 'channels': fetch_channels} + params={'members': str(fetch_members).lower(), 'channels': str(fetch_channels).lower()} ) return Guild(self._connection, g) diff --git a/ferris/guild.py b/ferris/guild.py index 0afaaa0..d0b69e6 100644 --- a/ferris/guild.py +++ b/ferris/guild.py @@ -22,7 +22,6 @@ class Guild(BaseObject): def __init__(self, connection: Connection, data: Data, /) -> None: self._connection: Connection = connection self._process_data(data) - super().__init__() def _process_data(self, data: Data, /) -> None: from .channel import Channel diff --git a/ferris/member.py b/ferris/member.py index 70c1156..db5c5ab 100644 --- a/ferris/member.py +++ b/ferris/member.py @@ -21,7 +21,6 @@ class Member(BaseObject): def __init__(self, connection: Connection, data: Data, /) -> None: self._connection: Connection = connection self._process_data(data) - super().__init__() def _process_data(self, data: Data, /) -> None: self._store_snowflake(cast(int, data.get('user_id'))) diff --git a/ferris/message.py b/ferris/message.py index 1d28abb..ffd4bf6 100644 --- a/ferris/message.py +++ b/ferris/message.py @@ -20,7 +20,6 @@ class Message(BaseObject): def __init__(self, connection: Connection, data: Data, /) -> None: self._connection: Connection = connection self._process_data(data) - super().__init__() def _process_data(self, data: Data, /) -> None: self._store_snowflake(cast(int, data.get('id')))