Пример #1
0
 def build_entity(self, **kwargs: typing.Any) -> voices.VoiceState:
     return voices.VoiceState(
         channel_id=self.channel_id,
         guild_id=self.guild_id,
         is_guild_deafened=self.is_guild_deafened,
         is_guild_muted=self.is_guild_muted,
         is_self_deafened=self.is_self_deafened,
         is_self_muted=self.is_self_muted,
         is_streaming=self.is_streaming,
         is_suppressed=self.is_suppressed,
         is_video_enabled=self.is_video_enabled,
         user_id=self.user_id,
         session_id=self.session_id,
         app=kwargs["app"],
         member=kwargs["member"],
     )
Пример #2
0
 def build_entity(self, app: traits.RESTAware, /) -> voices.VoiceState:
     member = self.member.object.build_entity(app)
     return voices.VoiceState(
         channel_id=self.channel_id,
         guild_id=self.guild_id,
         is_guild_deafened=self.is_guild_deafened,
         is_guild_muted=self.is_guild_muted,
         is_self_deafened=self.is_self_deafened,
         is_self_muted=self.is_self_muted,
         is_streaming=self.is_streaming,
         is_suppressed=self.is_suppressed,
         is_video_enabled=self.is_video_enabled,
         user_id=member.user.id,
         session_id=self.session_id,
         app=app,
         member=member,
     )