Example #1
0
        public CachedVoiceState(IGatewayClient client, Snowflake guildId, VoiceStateJsonModel model)
            : base(client, model.UserId)
        {
            GuildId = guildId;

            Update(model);
        }
 public void Update(VoiceStateJsonModel model)
 {
     ChannelId           = model.ChannelId;
     SessionId           = model.SessionId;
     IsDeafened          = model.Deaf;
     IsMuted             = model.Mute;
     IsSelfDeafened      = model.SelfDeaf;
     IsSelfMuted         = model.SelfMute;
     IsStreaming         = model.SelfStream.GetValueOrDefault();
     IsTransmittingVideo = model.SelfVideo;
     RequestedToSpeakAt  = model.RequestToSpeakTimestamp;
 }