Пример #1
0
        /// <summary>
        /// Creates a new instance of this music service.
        /// </summary>
        /// <param name="redis">Redis client to use for persistence.</param>
        /// <param name="rng">Cryptographically-secure random number generator implementaion.</param>
        public MusicService(SecureRandom rng, LavalinkService lavalink, CompanionCubeBot bot)
        {
            this.Lavalink  = lavalink;
            this.RNG       = rng;
            this.MusicData = new ConcurrentDictionary <ulong, GuildMusicData>();
            this.Discord   = bot.Discord;

            this.Lavalink.TrackExceptionThrown += this.Lavalink_TrackExceptionThrown;
        }
Пример #2
0
 /// <summary>
 /// Creates a new instance of this music service.
 /// </summary>
 /// <param name="redis">Redis client to use for persistence.</param>
 /// <param name="rng">Cryptographically-secure random number generator implementaion.</param>
 public MusicService(CSPRNG rng, LavalinkService lavalink)
 {
     this.Lavalink  = lavalink;
     this.RNG       = rng;
     this.MusicData = new ConcurrentDictionary <ulong, GuildMusicData>();
 }