/// <summary>
        /// Makes a new instance of <see cref="MusicPlayer"/> class.
        /// </summary>
        public MusicPlayer(DiscordServer server, Youtube youtube)
        {
            _server  = server;
            _audio   = server.AudioModule;
            _youtube = youtube;

            ReproductionQueue = new ConcurrentQueue <SongReproductionState>();

            Drawer = new PlayerDrawable(this, server.DiscordClient)
            {
                Avatar = server.Configuration["player:avatar"]
            };
        }
Beispiel #2
0
        /// <summary>
        /// Makes a new instance of <see cref="Cocorita"/> class.
        /// </summary>
        public Cocorita(DiscordServer server)
        {
            _server = server;
            _voice  = _server.AudioModule;
            _config = _server.Configuration;
            _rand   = _server.Rand;

            _voice.UserStateChange += UserStateChange;
            _voice.PcmReceived     += PcmReceived;

            Drawable = new CocoritaDrawable(server.DiscordClient, this)
            {
                Avatar = _config["parrot:avatar"]
            };

            Recorders = new ConcurrentDictionary <ulong, MemoryStream>();
        }