예제 #1
0
        private static void ChangeVoiceState(this DiscordSocketClient client, ulong guildId, ulong?channelId, bool muted = false, bool deafened = false)
        {
            VoiceStateChange state = new VoiceStateChange()
            {
                GuildId   = guildId,
                ChannelId = channelId,
                Muted     = muted,
                Deafened  = deafened
            };

            client.Socket.Send(GatewayOpcode.VoiceStateUpdate, state);
        }
예제 #2
0
 /// <summary>
 /// Changes a client's voice state
 /// </summary>
 public static void ChangeVoiceState(this DiscordSocketClient client, VoiceStateChange state)
 {
     client.Send(GatewayOpcode.VoiceStateUpdate, state);
 }