Пример #1
0
        internal static async Task <IVoiceChannel> JoinSame(IGuildUser User)
        {
            var Channel = User?.VoiceChannel;

            if (Channel != null)
            {
                Streamer.Stop();

                var Client = await Channel.ConnectAsync(Peer =>
                {
                    Peer.StreamCreated   += async(s, e) => Speech.StartListenService(s, e);
                    Peer.StreamDestroyed += async s => Speech.StopListenService(s);
                });

                Streamer.Start(Client);
            }

            return(Channel);
        }
Пример #2
0
 private static async Task UserLeaveVoice(ulong s)
 {
     Speech.StopListenService(s);
 }