public async Task VoiceStatusUpdateAsync(ulong?channelId, ulong?guildId = null, bool selfMute = false, bool selfDeaf = false)
        {
            var payload = new VoiceStatusUpdate()
            {
                GuildId   = guildId,
                ChannelId = channelId,
                Deaf      = selfDeaf,
                Mute      = selfMute,
            };

            await VoiceStatusUpdateAsync(payload);
        }
Beispiel #2
0
        public async Task VoiceStatusUpdate(string guildId, string channelId, bool selfMute, bool selfDeaf)
        {
            var payload = new VoiceStatusUpdate()
            {
                GuildId   = guildId,
                ChannelId = channelId,
                Deaf      = selfDeaf,
                Mute      = selfMute
            };

            var request = new SocketFrame()
            {
                Operation = (int)OperationCode.VoiceStateUpdate,
                Payload   = payload
            };

            await SendMessageAsync(JsonConvert.SerializeObject(request));

            //await _webMessageSocket.SendJsonObjectAsync(request);
        }
 public async Task VoiceStatusUpdateAsync(VoiceStatusUpdate payload)
 {
     await SendMessageAsync(GatewayOperation.VoiceStateUpdate, payload);
 }