Tidied up users
"""
Generic users not bound to a guild, and guild-bound member definitions.
"""
+__all__ = ("User", "Member")
-__all__ = ()
-
-import enum
+import dataclasses
from hikari.model import base
+from hikari.utils import delegate
+@dataclasses.dataclass()
class User(base.SnowflakeMixin):
- __slots__ = ()
-
-
-class UserFlag(enum.IntFlag):
- ...
-
-
-class PremiumType(enum.IntEnum):
- ...
-
-
-class Connection(base.SnowflakeMixin):
- __slots__ = ()
-
+ __slots__ = ("id", "username", "discriminator", "avatar", "bot")
-class ConnectionVisibility(enum.IntEnum):
- ...
+ id: int
+ username: str
+ discriminator: int
+ avatar: bytes
+ bot: bool
-class Member(base.SnowflakeMixin):
+class Member(base.SnowflakeMixin, metaclass=delegate.DelegatedMeta, delegate_to=(User, "_user")):
"""
A specialization of a user which provides
"""
