/// <summary>
        ///     Initializes a new instance of the <see cref="QueuedLavalinkPlayer"/> class.
        /// </summary>
        public QueuedLavalinkPlayer()
        {
            Queue = new LavalinkQueue();

            // use own disconnect on stop logic
            _disconnectOnStop = DisconnectOnStop;
            DisconnectOnStop  = false;
        }
Exemplo n.º 2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="QueuedLavalinkPlayer"/> class.
 /// </summary>
 /// <param name="lavalinkSocket">the lavalink socket</param>
 /// <param name="client">the discord client</param>
 /// <param name="guildId">the identifier of the guild that is controlled by the player</param>
 /// <param name="disconnectOnStop">
 ///     a value indicating whether the player should stop after the track finished playing
 /// </param>
 /// <exception cref="ArgumentNullException">
 ///     thrown if the specified <paramref name="lavalinkSocket"/> is <see langword="null"/>.
 /// </exception>
 /// <exception cref="ArgumentNullException">
 ///     thrown if the specified <paramref name="client"/> is <see langword="null"/>.
 /// </exception>
 public QueuedLavalinkPlayer(LavalinkSocket lavalinkSocket, IDiscordClientWrapper client, ulong guildId, bool disconnectOnStop)
     : base(lavalinkSocket, client, guildId, false /* this player handles this on itself */)
 {
     Queue             = new LavalinkQueue();
     _disconnectOnStop = disconnectOnStop;
 }