def build_entity(self, **kwargs: typing.Any) -> guilds.Member: return guilds.Member( guild_id=self.guild_id, nickname=self.nickname, role_ids=self.role_ids, joined_at=self.joined_at, premium_since=self.premium_since, is_deaf=self.is_deaf, is_mute=self.is_mute, user=kwargs["user"], )
def make_guild_member(user_id, username): user = make_user(user_id, username) return guilds.Member( user=user, guild_id=snowflakes.Snowflake(2233), role_ids=[], joined_at=datetime.datetime.now(), nickname=user.username, premium_since=None, is_deaf=False, is_mute=False, )
def build_entity(self, _: traits.RESTAware, /) -> guilds.Member: return guilds.Member( guild_id=self.guild_id, nickname=self.nickname, role_ids=self.role_ids, joined_at=self.joined_at, premium_since=self.premium_since, is_deaf=self.is_deaf, is_mute=self.is_mute, is_pending=self.is_pending, user=self.user.copy(), )
def build_entity(self, _: traits.RESTAware, /) -> guilds.Member: return guilds.Member( guild_id=self.guild_id, nickname=self.nickname, role_ids=self.role_ids, joined_at=self.joined_at, guild_avatar_hash=self.guild_avatar_hash, premium_since=self.premium_since, is_deaf=self.is_deaf, is_mute=self.is_mute, is_pending=self.is_pending, raw_communication_disabled_until=self.raw_communication_disabled_until, user=self.user.copy(), )
def model(self, mock_user): return guilds.Member( guild_id=snowflakes.Snowflake(456), is_deaf=True, is_mute=True, joined_at=datetime.datetime.now().astimezone(), nickname="davb", premium_since=None, role_ids=[ snowflakes.Snowflake(456), snowflakes.Snowflake(1234), ], user=mock_user, )
def make_guild_member(user_id, username): user = make_user(user_id, username) return guilds.Member( user=user, guild_id=snowflakes.Snowflake(2233), role_ids=[], joined_at=datetime.datetime.now(), nickname=user.username, premium_since=None, guild_avatar_hash="no", is_deaf=False, is_mute=False, is_pending=False, raw_communication_disabled_until=None, )